Browse Source

盯盘-账户

yangzian 3 years ago
parent
commit
dab0043777

+ 5 - 8
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/mapper/xml/MaterialStareMapper.xml

@@ -369,16 +369,13 @@
     <!-- 快手 账户 余额 以及状态 -->
     <select id="getKuaiShouAccountTotalCost" resultType="com.alibaba.fastjson.JSONObject">
         SELECT
-        u.account_id as accountId,
-        u.auth_name as accountName,
-        u.account_status as accountStatus,
-        SUM( h.charge ) todayCost
+            u.account_id as accountId,
+            u.auth_name as accountName,
+            u.account_status as accountStatus,
+            IFNULL((SELECT SUM( h.charge ) from application.kuaishou_account_report_hourly_dw h where u.account_id = h.account_id and h.stat_date = #{statDate}),0) as todayCost
         FROM
         `jeecg-boot`.`ctop_user_allocation` u
-        LEFT JOIN application.kuaishou_account_report_hourly_dw h
-        ON u.account_id = h.account_id
-        and h.account_id = #{accountId}
-        and h.stat_date = #{statDate}
+        WHERE u.account_id = #{accountId}
 
     </select>