|
@@ -0,0 +1,47 @@
|
|
|
+package com.sxtvs.open.api.h5template.dto;
|
|
|
+
|
|
|
+import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
+import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
+import com.sxtvs.open.api.h5template.entity.H5Operate;
|
|
|
+import com.sxtvs.open.core.advice.BizException;
|
|
|
+import lombok.Data;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
+
|
|
|
+import java.time.LocalDateTime;
|
|
|
+
|
|
|
+@Data
|
|
|
+public class H5OperateParseDTO {
|
|
|
+ private Long id;
|
|
|
+
|
|
|
+ private String title;
|
|
|
+
|
|
|
+ private String h5Desc;
|
|
|
+
|
|
|
+ private Object hoversList;
|
|
|
+
|
|
|
+ private Integer h5Status;
|
|
|
+
|
|
|
+ private LocalDateTime createTime;
|
|
|
+
|
|
|
+ private LocalDateTime updateTime;
|
|
|
+
|
|
|
+ private String url;
|
|
|
+
|
|
|
+ private Long templateId;
|
|
|
+
|
|
|
+ private String cover;
|
|
|
+
|
|
|
+ private String type;
|
|
|
+
|
|
|
+ public H5OperateParseDTO(H5Operate h5Operate) {
|
|
|
+
|
|
|
+ BeanUtils.copyProperties(h5Operate, this);
|
|
|
+ ObjectMapper objectMapper = new ObjectMapper();
|
|
|
+ try {
|
|
|
+ this.hoversList = objectMapper.readValue(h5Operate.getHoversList(), Object.class);
|
|
|
+ } catch (JsonProcessingException e) {
|
|
|
+ throw new BizException("json转换失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|