Explorar el Código

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-boot

zhaoxian hace 4 años
padre
commit
fc8497b9ba

+ 7 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouUpdateServiceImpl.java

@@ -520,6 +520,13 @@ public class KuaiShouUpdateServiceImpl implements IKuaiShouUpdateService {
                     returnMap.put("code", -1);
                     returnMap.put("success", false);
                     returnMap.put("message", resultJson.getString("message"));
+                    if (resultJson.getString("message").equals("该账户下创意不存在")) {
+                        Map<String, Object> deleteMap = new HashMap<>();
+                        deleteMap.put("creative_id", creativeId);
+                        creativeMapper.deleteByMap(deleteMap);
+                    }
+
+
                 }
             } else {
                 log.error("修改广告创意返回结果为空,advertiserId:{},creativeId:{}", advertiserId, creativeId);

+ 6 - 6
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KsVideoReportMapper.xml

@@ -6,9 +6,9 @@
         SELECT * from (SELECT
         t1.signature,
         t1.photo_url as url,
-        (SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.clip_id=u.id where t3.material_id=t1.signature limit 1) AS clip,
-        (SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.shot_id=u.id where t3.material_id=t1.signature limit 1) AS shot,
-        (SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.plan_id=u.id where t3.material_id=t1.signature limit 1) AS plan,
+        IFNULL((SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.clip_id=u.id where t3.material_id=t1.signature limit 1),'') AS clip,
+        IFNULL((SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.shot_id=u.id where t3.material_id=t1.signature limit 1),'') AS shot,
+        IFNULL((SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.plan_id=u.id where t3.material_id=t1.signature limit 1),'') AS plan,
         t1.cover_url as converUrl,
         t2.material_name AS materialName,
         (SELECT project_name FROM ctop_project t4 WHERE t4.id = t3.project_id) AS projectName,
@@ -30,9 +30,9 @@
         </if>
         GROUP BY t1.signature
         ) t
-        WHERE (t.clip LIKE '%${clip}%' or t.clip is null)
-        AND (t.shot LIKE '%${shot}%' or t.shot is null)
-        AND (t.plan LIKE '%${plan}%' or t.plan is null)
+        WHERE (t.clip LIKE '%${clip}%')
+        AND (t.shot LIKE '%${shot}%')
+        AND (t.plan LIKE '%${plan}%')
         ORDER BY ${target} ${order}
     </select>
 

+ 11 - 11
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/BytedanceVideoReportMapper.xml

@@ -6,9 +6,9 @@
         SELECT * from (SELECT
         t1.signature,
         t2.url,
-        (SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.clip_id=u.id where t3.material_id=t1.signature limit 1) AS clip,
-        (SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.shot_id=u.id where t3.material_id=t1.signature limit 1) AS shot,
-        (SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.plan_id=u.id where t3.material_id=t1.signature limit 1) AS plan,
+        IFNULL((SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.clip_id=u.id where t3.material_id=t1.signature limit 1),'') AS clip,
+        IFNULL((SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.shot_id=u.id where t3.material_id=t1.signature limit 1),'') AS shot,
+        IFNULL((SELECT u.realname FROM ctop_material_ascription t3 LEFT JOIN sys_user u on t3.plan_id=u.id where t3.material_id=t1.signature limit 1),'') AS plan,
         t2.cover_url as converUrl,
         t2.material_name AS materialName,
         (SELECT project_name FROM ctop_project t4 WHERE t4.id = t3.project_id) AS projectName,
@@ -22,18 +22,18 @@
         t1.stat_datetime >= #{startDate}
         AND t1.stat_datetime &lt;= #{endDate}
         <if test="accountIds != null">
-        AND t1.account_id in
-        <foreach item="item" index="index" collection="accountIds"
-                 open="(" separator="," close=")">
-            #{item}
-        </foreach>
+            AND t1.account_id in
+            <foreach item="item" index="index" collection="accountIds"
+                     open="(" separator="," close=")">
+                #{item}
+            </foreach>
         </if>
         AND t2.url!=""
         GROUP BY t1.signature
         ) t
-        WHERE (t.clip LIKE '%${clip}%' or t.clip is null)
-        AND (t.shot LIKE '%${shot}%' or t.shot is null)
-        AND (t.plan LIKE '%${plan}%' or t.plan is null)
+        WHERE (t.clip LIKE '%${clip}%')
+        AND (t.shot LIKE '%${shot}%')
+        AND (t.plan LIKE '%${plan}%')
         ORDER BY ${target} ${order}
     </select>