Forráskód Böngészése

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

zhaoxian 4 éve
szülő
commit
c05fba7ebd

+ 9 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/controller/KuaiShouAccountReportCtrl.java

@@ -51,6 +51,9 @@ public class KuaiShouAccountReportCtrl {
         String mediaId = requestBody.getString("mediaId");
         BigDecimal discount = requestBody.getBigDecimal("discount");
         JSONArray accounts = requestBody.getJSONArray("accountIds");
+        if(accounts.isEmpty()){
+            return resultBody;
+        }
         String startDate = requestBody.getString("startDate");
         String endDate = requestBody.getString("endDate");
         try {
@@ -80,6 +83,9 @@ public class KuaiShouAccountReportCtrl {
         String mediaId = requestBody.getString("mediaId");
         BigDecimal discount = requestBody.getBigDecimal("discount");
         JSONArray accounts = requestBody.getJSONArray("accountIds");
+        if(accounts.isEmpty()){
+            return result;
+        }
         String startDate = requestBody.getString("startDate");
         String endDate = requestBody.getString("endDate");
         int hour= requestBody.getInteger("hour");
@@ -117,6 +123,9 @@ public class KuaiShouAccountReportCtrl {
         columns.add(1,"authName");
         String mediaId = requestBody.getString("mediaId");
         JSONArray accounts = requestBody.getJSONArray("accountIds");
+        if(accounts.isEmpty()){
+            return;
+        }
         String startDate = requestBody.getString("startDate");
         String endDate = requestBody.getString("endDate");
         String target= requestBody.getString("target");

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

@@ -444,7 +444,7 @@
             and t1.stat_date = #{statDate}
         </if>
         ) t2
-        WHERE t2.campaignName in(581,582,583,584,552,553,554,680,681,845,846,847,848,849,850,1070,1071,1072,1066,1069,1064)
+        WHERE t2.campaignName in(68,441,469,470,481,581,582,583,584,552,553,554,680,681,845,846,847,848,849,850,1070,1071,1072,1066,1069,1063,1064)
 
     </select>
 

+ 18 - 8
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyAccountMapper.xml

@@ -545,7 +545,7 @@
         a.account_id as 'accountId',
         b.auth_name as 'authName',
         b.project_id as 'projectId',
-        (select  project_name from ctop_project where  id = b.project_id) as 'projectName',
+        (select project_name from ctop_project where id = b.project_id) as 'projectName',
         round(sum(a.charge),2) as 'charge',
         sum(a.photo_show) as 'photoShow', -- 封面曝光数
         sum(a.photo_click) as 'photoClick', -- 封面点击数
@@ -595,7 +595,7 @@
         ) as 'eventNextDayStayCost' -- 次日留存成本
         from
         ctop_kuaishou_report_daily_account a
-        left join  ctop_user_allocation b on a.account_id = b.account_id
+        left join ctop_user_allocation b on a.account_id = b.account_id
         where
         a.stat_date &gt;= #{startDate}
         and
@@ -637,6 +637,11 @@
         ) as 'responsibleName',
         (
         select realname from sys_user where id = (
+        select sale_id from ctop_project where id = b.project_id
+        )
+        ) as 'saleName',
+        (
+        select realname from sys_user where id = (
         select design_responsible_id from ctop_project where id = b.project_id
         )
         ) as 'designResponsibleName',
@@ -702,7 +707,7 @@
                  open="(" close=")">
             #{item}
         </foreach>
-        group by b.project_id  order by sum(a.charge) desc
+        group by b.project_id order by sum(a.charge) desc
     </select>
 
     <!-- 计划汇总 -->
@@ -713,7 +718,7 @@
         #{yn} as 'yn',
         concat(#{startDate}, '~' ,#{endDate}) as 'statDate',
         b.project_id as 'projectId',
-        (select  project_name  from ctop_project where  id = b.project_id) as 'projectName',
+        (select project_name from ctop_project where id = b.project_id) as 'projectName',
         b.auth_name as 'authName',
         a.account_id as 'accountId',
         a.campaign_id as 'campaignId', -- 计划id
@@ -809,7 +814,7 @@
         #{yn} as 'yn',
         concat(#{startDate}, '~' ,#{endDate}) as 'statDate',
         b.project_id as 'projectId',
-        (select  project_name  from ctop_project where  id = b.project_id) as 'projectName',
+        (select project_name from ctop_project where id = b.project_id) as 'projectName',
         a.account_id as 'accountId',
         b.auth_name as 'authName',
         a.campaign_id as 'campaignId', -- 计划id
@@ -991,7 +996,7 @@
         #{yn} as 'yn',
         concat(#{startDate}, '~' ,#{endDate}) as 'statDate',
         b.project_id as 'projectId',
-        (select  project_name  from ctop_project where  id = b.project_id) as 'projectName',
+        (select project_name from ctop_project where id = b.project_id) as 'projectName',
         a.account_id as 'accountId',
         b.auth_name as 'authName',
         a.creative_id as 'creativeId',
@@ -1052,7 +1057,7 @@
         (select material_type from ctop_kuaishou_video_get where photo_id = c.photo_id limit 1) as materialType
         from
         ctop_kuaishou_report_daily_creative a
-        left join ctop_user_allocation  b on a.account_id = b.account_id
+        left join ctop_user_allocation b on a.account_id = b.account_id
         left join ctop_kuaishou_creative c on a.creative_id = c.creative_id
         where
         a.stat_date &gt;= #{startDate}
@@ -1153,6 +1158,11 @@
         ) as 'responsibleName',
         (
         select realname from sys_user where id = (
+        select sale_id from ctop_project where id = b.project_id
+        )
+        ) as 'saleName',
+        (
+        select realname from sys_user where id = (
         select design_responsible_id from ctop_project where id = b.project_id
         )
         ) as 'designResponsibleName',
@@ -1218,7 +1228,7 @@
                  open="(" close=")">
             #{item}
         </foreach>
-        group by b.project_id  order by sum(a.charge) desc
+        group by b.project_id order by sum(a.charge) desc
 
     </select>
 

+ 9 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceAccountReportCtrl.java

@@ -53,6 +53,9 @@ public class BytedanceAccountReportCtrl {
         String mediaId = requestBody.getString("mediaId");
         BigDecimal discount = requestBody.getBigDecimal("discount");
         JSONArray accounts = requestBody.getJSONArray("accountIds");
+        if(accounts.isEmpty()){
+         return resultBody;
+        }
         String startDate = requestBody.getString("startDate");
         String endDate = requestBody.getString("endDate");
         try {
@@ -84,6 +87,9 @@ public class BytedanceAccountReportCtrl {
         String mediaId = requestBody.getString("mediaId");
         BigDecimal discount = requestBody.getBigDecimal("discount");
         JSONArray accounts = requestBody.getJSONArray("accountIds");
+        if(accounts.isEmpty()){
+            return result;
+        }
         String startDate = requestBody.getString("startDate");
         String endDate = requestBody.getString("endDate");
         int hour= requestBody.getInteger("hour");
@@ -124,6 +130,9 @@ public class BytedanceAccountReportCtrl {
         columns.add(1,"authName");
         String mediaId = requestBody.getString("mediaId");
         JSONArray accounts = requestBody.getJSONArray("accountIds");
+        if(accounts.isEmpty()){
+            return;
+        }
         String startDate = requestBody.getString("startDate");
         String endDate = requestBody.getString("endDate");
         String target= requestBody.getString("target");

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

@@ -374,6 +374,11 @@
         ) as 'designResponsibleName',
         b.auth_name as 'authName',
         b.project_id as 'projectId',
+        (
+        select realname from sys_user where id = (
+        select sale_id from ctop_project where id = b.project_id
+        )
+        ) as 'saleName',
         (select project_name from ctop_project where id = b.project_id) as 'projectName',
         c.media_id as 'mediaId',
         <include refid="selectSql"></include>
@@ -526,6 +531,12 @@
         select design_responsible_id from ctop_project where id = b.project_id
         )
         ) as 'designResponsibleName',
+
+        (
+        select realname from sys_user where id = (
+        select sale_id from ctop_project where id = b.project_id
+        )
+        ) as 'saleName',
         b.auth_name as 'authName',
         b.project_id as 'projectId',
         (select project_name from ctop_project where id = b.project_id) as 'projectName',