فهرست منبع

字自动投放-素材类型筛选

yumeng 4 سال پیش
والد
کامیت
76258059de

+ 16 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/KuaiShouMaterialControer.java

@@ -93,6 +93,7 @@ public class KuaiShouMaterialControer {
                 throw new Exception("未获取账号授权信息");
             }
             String appVersion = requestJson.getString("appVersion");
+            Integer channelType = requestJson.getInteger("channelType");
             KuaiShouVideoLastTime videoLastTime = lastTimeService.getById(accountId);
             Date startTime;
             Date endDate = new Date();
@@ -108,6 +109,9 @@ public class KuaiShouMaterialControer {
             if (!Check.isNull(appVersion)) {
                 requestMap.put("appVersion", appVersion);
             }
+            if (!Check.isNull(channelType)) {
+                requestMap.put("channelType", channelType);
+            }
             List<JSONObject> materialList = videoGetService.getVideoListByMap(requestMap);
             if (!Check.isNull(materialList)) {
                 for (int i = 0; i < materialList.size(); i++) {
@@ -171,6 +175,7 @@ public class KuaiShouMaterialControer {
                 throw new Exception("请输入查询条数");
             }
             String appVersion = requestJson.getString("appVersion");
+            Integer channelType = requestJson.getInteger("channelType");
             Map<String, Object> requestMap = new HashMap<>();
             requestMap.put("startTime", startDate);
             requestMap.put("endTime", endDate);
@@ -180,6 +185,9 @@ public class KuaiShouMaterialControer {
             if (!Check.isNull(appVersion)) {
                 requestMap.put("appVersion", appVersion);
             }
+            if (!Check.isNull(channelType)) {
+                requestMap.put("channelType", channelType);
+            }
             List<JSONObject> materialList = relateCreativesService.getVideoListByMap(requestMap);
             if (!Check.isNull(materialList)) {
                 materialList = videoGetService.getVideoInfoAndImageList(materialList);
@@ -234,10 +242,14 @@ public class KuaiShouMaterialControer {
             requestMap.put("startDate", startDate);
             requestMap.put("endDate", endDate);
             requestMap.put("accountId", accountId);
+            Integer channelType = requestJson.getInteger("channelType");
             requestMap.put("num", num);
             if (!Check.isNull(appVersion)) {
                 requestMap.put("appVersion", appVersion);
             }
+            if (!Check.isNull(channelType)) {
+                requestMap.put("channelType", channelType);
+            }
             List<JSONObject> materialList = relateCreativesService.getHistoryTopVideoList(requestMap);
             if (!Check.isNull(materialList)) {
                 materialList = videoGetService.getVideoInfoAndImageList(materialList);
@@ -289,6 +301,7 @@ public class KuaiShouMaterialControer {
                 throw new Exception("请输入查询结束时间");
             }
             String appVersion = requestJson.getString("appVersion");
+            Integer channelType = requestJson.getInteger("channelType");
             Map<String, Object> requestMap = new HashMap<>();
             requestMap.put("startTime", startTime);
             requestMap.put("endTime", endTime);
@@ -297,6 +310,9 @@ public class KuaiShouMaterialControer {
             if (!Check.isNull(appVersion)) {
                 requestMap.put("appVersion", appVersion);
             }
+            if (!Check.isNull(channelType)) {
+                requestMap.put("channelType", channelType);
+            }
             List<JSONObject> materialList = relateCreativesService.getVideoZeroListByMap(requestMap);
             if (!Check.isNull(materialList)) {
                 materialList = videoGetService.getVideoInfoAndImageList(materialList);

+ 3 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouVideoGetMapper.xml

@@ -112,6 +112,9 @@
         <if test="endTime != null and endTime != '' ">
             and stat_date &lt;= #{endTime}
         </if>
+        <if test="channelType != null and channelType != '' ">
+            and channel_type = #{channelType}
+        </if>
         <if test="appVersion != null and appVersion != '' ">
             and photo_name like concat(#{appVersion},'%')
         </if>

+ 9 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaishouVideoRelateCreativesMapper.xml

@@ -42,6 +42,9 @@
         <if test="endTime != null and endTime != '' ">
             and t1.stat_date &lt;= #{endTime}
         </if>
+        <if test="channelType != null and channelType != '' ">
+            and t1.channel_type = #{channelType}
+        </if>
         <if test="appVersion != null and appVersion != '' ">
             and t1.photo_id in (
             select photo_id from ctop_kuaishou_video_get
@@ -70,6 +73,9 @@
         <if test="endTime != null and endTime != '' ">
             AND stat_date &lt;= #{endTime}
         </if>
+        <if test="channelType != null and channelType != '' ">
+            and channel_type = #{channelType}
+        </if>
         <if test="appVersion != null and appVersion != '' ">
             and photo_id in (
             select photo_id from ctop_kuaishou_video_get
@@ -106,6 +112,9 @@
         <if test="appVersion != null and appVersion != '' ">
             and photo_name like concat(#{appVersion},'%')
         </if>
+        <if test="channelType != null and channelType != '' ">
+            and channel_type = #{channelType}
+        </if>
         and status = 0
         and signature is not null
         )