|
@@ -5,9 +5,11 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.sxtvs.open.api.h5template.entity.H5Template;
|
|
|
import com.sxtvs.open.core.advice.BizException;
|
|
|
import lombok.Data;
|
|
|
+import org.apache.http.util.TextUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.util.ArrayList;
|
|
|
|
|
|
@Data
|
|
|
public class H5TemplateParseDTO {
|
|
@@ -34,7 +36,11 @@ public class H5TemplateParseDTO {
|
|
|
BeanUtils.copyProperties(h5Template, this);
|
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
|
try {
|
|
|
- this.hoversList = objectMapper.readValue(h5Template.getHoversList(), Object.class);
|
|
|
+ if(!TextUtils.isEmpty(h5Template.getHoversList())){
|
|
|
+ this.hoversList = objectMapper.readValue(h5Template.getHoversList(), Object.class);
|
|
|
+ }else{
|
|
|
+ this.hoversList = new ArrayList<>();
|
|
|
+ }
|
|
|
} catch (JsonProcessingException e) {
|
|
|
throw new BizException("json转换失败");
|
|
|
}
|