فهرست منبع

总金额加上线下支付金额

xgb 1 ماه پیش
والد
کامیت
8cb626c3c5
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      fs-service/src/main/resources/mapper/hisStore/FsStoreOrderScrmMapper.xml

+ 2 - 2
fs-service/src/main/resources/mapper/hisStore/FsStoreOrderScrmMapper.xml

@@ -1016,7 +1016,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ) o GROUP BY o.company_user_id order by validAmount desc
     </select>
 
-    <!-- 总金额totalAmount 不包括取消金额和 退款金额 待支付-->
+<!-- 加上线下金额    总金额totalAmount 不包括取消金额和 退款金额 待支付-->
     <!--  待支付-0 待发货-1 待收货-2 交易完成-3 ;退款中-(-1); 已退款-(-2) ;已取消- (-3);  -->
     <!-- 成单金额 = 总金额  审核通过的,没有审核就是支付成功的 -->
     <!-- totalOfflineAmount 线下支付金额   -->
@@ -1030,7 +1030,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
   <!--    成交金额=实际支付金额   -->
     <sql id="selectFsStoreOrderConditions">
         sum(case when o.status in (1,2,3,-1) and (o.audit_status is null or o.audit_status = 4) then 1 else 0 end) AS totalCalls,
-        sum(case when o.status in (1,2,3,-1) and  (o.audit_status is null or o.audit_status = 4) then o.pay_price else 0 end) AS totalAmount,
+        sum(case when o.status in (1,2,3,-1) and  (o.audit_status is null or o.audit_status = 4) then o.pay_price + ifnull(o.offline_pay_amount, 0) else 0 end) AS totalAmount,
 
         SUM(CASE WHEN o.status IN (1,2,3,-1) and (o.audit_status is null or o.audit_status = 4) THEN o.pay_price ELSE 0 END) AS validAmount,