소스 검색

人群包功能开发,查询列表状态添加逻辑

zhaoxian 4 년 전
부모
커밋
c2cf76ea00
1개의 변경된 파일18개의 추가작업 그리고 6개의 파일을 삭제
  1. 18 6
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/mapper/xml/KuaishouCrowdPackMapper.xml

+ 18 - 6
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/mapper/xml/KuaishouCrowdPackMapper.xml

@@ -44,8 +44,23 @@
         WHEN 8 THEN 'OAID_MD5'
         ELSE ''
         END as 'typeStr',
-        t4.statusStr,
-        t4.`status`,
+        <if test="status ==null">
+            t4.statusStr,
+            t4.`status`,
+        </if>
+        <if test="status !=null">
+            t1.`status`,
+            CASE t1.`status`
+            WHEN 0 THEN '计算中'
+            WHEN 1 THEN '已生效'
+            WHEN 3 THEN '推送中'
+            WHEN 4 THEN '已推送'
+            WHEN 5 THEN '计算失败'
+            WHEN 6 THEN '推送失败'
+            WHEN 7 THEN '已失效'
+            ELSE ''
+            END as 'statusStr',
+        </if>
         IFNULL(t1.signature,'') as 'signature',
         IFNULL(cover_num,0) as 'coverNum'
         FROM ctop_kuaishou_crowd_package t1
@@ -108,9 +123,6 @@
         <if test="accountId !=null">
             AND t2.account_id =#{accountId}
         </if>
-        <if test="status !=null">
-            AND t1.`status` =#{status}
-        </if>
         GROUP BY t1.signature
         )
         GROUP BY t1.signature,`status`
@@ -129,7 +141,7 @@
             AND t2.account_id =#{accountId}
         </if>
         <if test="status !=null">
-            AND t4.`status` =#{status}
+            AND t1.`status` =#{status}
         </if>
         GROUP BY t1.signature
         order by t1.update_time desc