Browse Source

运营绩效功能,优化问题

zhaoxian 2 years ago
parent
commit
9790e6e1fe

+ 2 - 15
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouOperationReportMapper.xml

@@ -222,27 +222,14 @@
         FROM (
                  SELECT SUM(charge) as 'totalCharge'
                  FROM application.kuaishou_operation_performance_base
-                 WHERE account_id IN (
-                     SELECT account_id
-                     FROM ctop_user_allocation
-                     WHERE user_id IN (SELECT user_id
-                                       FROM `application`.app_user_manage
-                                       WHERE manage_id = #{userId})
-                 )
+                 WHERE leader_id = #{userId}
                    AND stat_date >= #{startDate}
                    AND stat_date <= #{endDate}
              ) t1
                  LEFT JOIN (
             SELECT SUM(contract_rebate_real_charged_in_yuan) as 'KFCharge', SUM(direct_rebate_real_charged_in_yuan) as 'JLCharge'
-
             FROM application.kuaishou_operation_performance_back_charge_base
-            WHERE account_id IN (
-                SELECT account_id
-                FROM ctop_user_allocation
-                WHERE user_id IN (SELECT user_id
-                                  FROM `application`.app_user_manage
-                                  WHERE manage_id = #{userId})
-            )
+            WHERE leader_id = #{userId}
               AND stat_date >= #{startDate}
               AND stat_date <= #{endDate}
         ) t2 ON 1 = 1