Browse Source

财务数据统计修复

zengxiangwen 4 years ago
parent
commit
c55d4d9277

+ 9 - 3
core/src/main/resources/com/sp/friendship/module/user/mapper/xml/UserAccountDetailMapper.xml

@@ -53,18 +53,24 @@
                 user_account_detail
             where
                 type = 18
+            and
+                DATE_FORMAT( create_time, "%Y-%m-%d" ) = DATE_FORMAT(now(), "%Y-%m-%d" )
             ),0)systemSendBeans,
             ifnull((select
-                -sum(trade_sugar)
+                sum(with_draw_amount) * 10
             from
-                user_account_detail
+                user_account_with_draw_detail
             where
-                type = 4
+                status = 3
+            and
+                DATE_FORMAT( create_time, "%Y-%m-%d" ) = DATE_FORMAT(now(), "%Y-%m-%d" )
             ),0) withDrawalSugars
         from
             user_account_detail
         where
             type = 0
+        and
+			DATE_FORMAT( create_time, "%Y-%m-%d" ) = DATE_FORMAT(now(), "%Y-%m-%d" )
     </select>
 
 </mapper>

+ 1 - 1
task/src/main/java/com/sp/friendship/task/RecordStatisticalAccountData.java

@@ -41,7 +41,7 @@ public class RecordStatisticalAccountData {
      *
      */
     @Async("taskExcutor")
-    @Scheduled(cron = "0 59 * * * ?")
+    @Scheduled(cron = "59 59 * * * ?")
     public void redordStatisticalData(){
         Date now = new Date();
         LOG.info("统计平台货币数据开始",now);