Browse Source

1.控制台钱包金额统计总收入调整

wuhp 1 năm trước cách đây
mục cha
commit
82894b7aad

+ 3 - 2
src/main/resources/mapper/modules/console/WithdrawalTaskMapper.xml

@@ -45,6 +45,7 @@
         <where>
             and a.auditing_status in ('3','2')
             and b.id is  not  null
+            and  a.approval != 1
             <if test="vo.beginDate  != null  and  vo.beginDate!=''  and vo.endDate  != null  and  vo.endDate!=''">
                 AND a.create_time BETWEEN #{vo.beginDate} AND #{vo.endDate}
             </if>
@@ -56,9 +57,9 @@
         select
               IFNULL(sum(a.amount),0) as "allWithdrawalAmount",
               IFNULL(count(a.id),0)  as "allWithdrawalNumber",
-              IFNULL(sum( CASE WHEN a.auditing_status = 2 THEN  IFNULL(a.amount,0)  END ),0)  AS notWithdrawalAmount,
+              IFNULL(sum( CASE WHEN a.auditing_status = 2 and  a.approval != 1  THEN  IFNULL(a.amount,0)  END ),0)  AS notWithdrawalAmount,
               IFNULL(sum( CASE WHEN a.auditing_status = 3 THEN  IFNULL(a.amount,0)  END ),0)  AS withdrawalAmount,
-              IFNULL(count(CASE WHEN a.auditing_status = 2 THEN  1  END),0) as "notAllWithdrawalNumber",
+              IFNULL(count(CASE WHEN a.auditing_status = 2  and  a.approval != 1 THEN  1  END),0) as "notAllWithdrawalNumber",
               IFNULL(count(CASE WHEN a.auditing_status = 3 THEN  1  END),0) as "withdrawalNumber",
               IFNULL(sum( CASE WHEN a.auditing_status = 4 THEN  IFNULL(a.amount,0)  END ),0)  AS "failedWithdrawalAmount",
               IFNULL(count(CASE WHEN a.auditing_status = 4 THEN  1  END),0) as "failedWithdrawalNumber"