소스 검색

脚本库代码逻辑修改

syh 5 년 전
부모
커밋
d3f2cb527f

+ 10 - 13
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/DramaInfoController.java

@@ -51,20 +51,17 @@ public class DramaInfoController {
 	public Map<String, Object> getDetail(Long dramaId) {
 		Map<String, Object> result = new HashMap<>();
 		List<DramaItemInfo> itemInfos = dramaItemInfoService.getByDramaId(dramaId);
+        List<DramaItemInfo> getItemInfos = new ArrayList<>();
+        for (DramaItemInfo itemInfo : itemInfos) {
+            if (itemInfo.getType() == 2) {
+                DramaRoleInfo roleInfo = dramaRoleInfoService.getById(itemInfo.getRoleId());
+                itemInfo.setRoleName(roleInfo.getName());
+            }
+            getItemInfos.add(itemInfo);
+        }
 		List<DramaRoleInfo> roleInfos = dramaRoleInfoService.getByDramaId(dramaId);
-		List<DramaRoleInfo> returnRoleInfos = new ArrayList<>();
-		DramaRoleInfo dramaRoleInfo1 = new DramaRoleInfo("情节描述", "scence");
-		returnRoleInfos.add(dramaRoleInfo1);
-		if (null != roleInfos && roleInfos.size() > 0) {
-			for (DramaRoleInfo roleInfo : roleInfos) {
-				roleInfo.setButtonType("dialogue_" + roleInfo.getId());
-				returnRoleInfos.add(roleInfo);
-			}
-		}
-		DramaRoleInfo dramaRoleInfo2 = new DramaRoleInfo("创建角色", "createRole");
-		returnRoleInfos.add(dramaRoleInfo2);
-		result.put("itemInfos", itemInfos);
-		result.put("roleInfos", returnRoleInfos);
+        result.put("itemInfos", getItemInfos);
+        result.put("roleInfos", roleInfos);
 		ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
 		return result;
 	}

+ 1 - 17
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/DramaItemInfoController.java

@@ -51,6 +51,7 @@ public class DramaItemInfoController {
         Result<IPage<DramaItemInfo>> result = new Result<IPage<DramaItemInfo>>();
         QueryWrapper<DramaItemInfo> queryWrapper = QueryGenerator.initQueryWrapper(dramaItemInfo, req.getParameterMap());
         Page<DramaItemInfo> page = new Page<DramaItemInfo>(pageNo, pageSize);
+        queryWrapper.orderByAsc("rank");
         IPage<DramaItemInfo> pageList = dramaItemInfoService.page(page, queryWrapper);
         result.setSuccess(true);
         result.setResult(pageList);
@@ -69,14 +70,6 @@ public class DramaItemInfoController {
     public Result<DramaItemInfo> add(@RequestBody DramaItemInfo dramaItemInfo) {
         Result<DramaItemInfo> result = new Result<>();
         try {
-            String buttonType = dramaItemInfo.getButtonType();
-            if (buttonType.startsWith("dialogue")) {
-                dramaItemInfo.setType("dialogue");
-                String[] infos = buttonType.split("_");
-                dramaItemInfo.setRoleId(Long.parseLong(infos[1]));
-            } else if (buttonType.startsWith("scence")) {
-                dramaItemInfo.setType("scence");
-            }
             dramaItemInfoService.save(dramaItemInfo);
             result.success("添加成功!");
         } catch (Exception e) {
@@ -101,20 +94,11 @@ public class DramaItemInfoController {
         if (dramaItemInfoEntity == null) {
             result.error500("未找到对应实体");
         } else {
-            String buttonType = dramaItemInfo.getButtonType();
-            if (buttonType.startsWith("dialogue")) {
-                dramaItemInfo.setType("dialogue");
-                String[] infos = buttonType.split("_");
-                dramaItemInfo.setRoleId(Long.parseLong(infos[1]));
-            } else if (buttonType.startsWith("scence")) {
-                dramaItemInfo.setType("scence");
-            }
             boolean ok = dramaItemInfoService.updateById(dramaItemInfo);
             if (ok) {
                 result.success("修改成功!");
             }
         }
-
         return result;
     }
 

+ 37 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/DramaInfo.java

@@ -32,6 +32,43 @@ public class DramaInfo {
 	private Integer nonpublic;
 	private String introduction;
 	private Integer status;
+    /**
+     * 场景
+     */
+    private String scnece;
+    /**
+     * 视频类型
+     */
+    private String videoType;
+    /**
+     * 时长
+     */
+    private Long timeLong;
+    /**
+     * 演员id
+     */
+    private String actorId;
+    /**
+     * 卖点
+     */
+    private String usp;
+    /**
+     * 演员/服化道备注
+     */
+    private String actorRemark;
+    /**
+     * 拍摄要求
+     */
+    private String shootReq;
+    /**
+     * 封面文案
+     */
+    private String coverText;
+    /**
+     * 剪辑备注
+     */
+    private String clipRemark;
+
 	private Date createTime;
 	private Date updateTime;
 }

+ 18 - 8
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/DramaItemInfo.java

@@ -36,9 +36,9 @@ public class DramaItemInfo {
     /**
      * 元素类型1:描述 2:对话
      */
-    @Excel(name = "元素类型1:描述 2:对话", width = 15)
+    @Excel(name = "元素类型1:情节描述 2:对话", width = 15)
     @ApiModelProperty(value = "元素类型1:描述 2:对话")
-    private String type;
+    private Integer type;
     /**
      * 剧本id
      */
@@ -52,11 +52,11 @@ public class DramaItemInfo {
     @ApiModelProperty(value = "roleId")
     private Long roleId;
     /**
-     * content
+     * 台词
      */
-    @Excel(name = "content", width = 15)
+    @Excel(name = "line", width = 15)
     @ApiModelProperty(value = "content")
-    private String content;
+    private String line;
     /**
      * 排序号
      */
@@ -80,10 +80,20 @@ public class DramaItemInfo {
     @ApiModelProperty(value = "updateTime")
     private Date updateTime;
 
-    @TableField(exist = false)
-    private String roleName;
+    /**
+     * 场景
+     */
+    private String scene;
+    /**
+     * 剪辑描述
+     */
+    private String clipRemark;
+    /**
+     * 画面内容
+     */
+    private String picContent;
 
     @TableField(exist = false)
-    private String buttonType;
+    private String roleName;
 
 }

+ 1 - 1
module-report/src/main/java/cn/com/ctop/bytedance/service/impl/ReportServiceImpl.java

@@ -224,7 +224,7 @@ public class ReportServiceImpl implements IReportService {
         config.propertyNamingStrategy = PropertyNamingStrategy.SnakeCase;
         var jsonObject = JSONObject.parseObject(JSON.toJSONString(conditions, config));
         JSONObject getObject = getAdStat(token, jsonObject);
-        log.warn(getObject.toJSONString());
+//        log.warn(getObject.toJSONString());
         if (null == getObject) {
             log.error("广告计划报表数据获取异常=》account:{};message:{}", token.getAccountId(), "返回数据异常");
             return;