From 29941310481c9452abbbc5a6b0757fb600cbdd1a Mon Sep 17 00:00:00 2001 From: Chopper Date: Thu, 21 Apr 2022 10:11:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BD=93=E7=BB=93=E7=AE=97=E5=91=A8?= =?UTF-8?q?=E6=9C=9F=E5=8F=AA=E6=9C=89=E4=B8=80=E5=A4=A9=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E7=BB=93=E7=AE=97=E9=97=AE=E9=A2=98=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/lili/modules/store/mapper/StoreDetailMapper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/src/main/java/cn/lili/modules/store/mapper/StoreDetailMapper.java b/framework/src/main/java/cn/lili/modules/store/mapper/StoreDetailMapper.java index e2b3fe7b..eed9ade0 100644 --- a/framework/src/main/java/cn/lili/modules/store/mapper/StoreDetailMapper.java +++ b/framework/src/main/java/cn/lili/modules/store/mapper/StoreDetailMapper.java @@ -69,7 +69,8 @@ public interface StoreDetailMapper extends BaseMapper { @Select("SELECT store_id,settlement_day FROM li_store_detail " + "WHERE settlement_cycle LIKE concat(#{day},',%') " + "OR settlement_cycle LIKE concat('%,',#{day},',%') " + - "OR settlement_cycle LIKE concat('%,',#{day})") + "OR settlement_cycle LIKE concat('%,',#{day})"+ + "OR settlement_cycle = #{day}") List getSettlementStore(int day); /** From 1917aa13d511974ec9b8a0d5824fe163ec25dfd3 Mon Sep 17 00:00:00 2001 From: fengtianyangyang Date: Thu, 21 Apr 2022 10:51:12 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=BA=97=E9=93=BA=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E7=A9=BA=E6=8C=87=E9=92=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/lili/modules/store/mapper/BillMapper.java | 16 ++++++++-------- .../store/serviceimpl/BillServiceImpl.java | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/store/mapper/BillMapper.java b/framework/src/main/java/cn/lili/modules/store/mapper/BillMapper.java index c6e1ea90..8d0c4724 100644 --- a/framework/src/main/java/cn/lili/modules/store/mapper/BillMapper.java +++ b/framework/src/main/java/cn/lili/modules/store/mapper/BillMapper.java @@ -35,11 +35,11 @@ public interface BillMapper extends BaseMapper { * @param queryWrapper 查询条件 * @return 结算单 */ - @Select("SELECT SUM( final_price ) AS orderPrice,SUM( commission_price ) AS commissionPrice" + - ",SUM( distribution_rebate ) AS distributionCommission,SUM( site_coupon_commission ) AS siteCouponCommission" + - ",SUM( point_settlement_price ) AS pointSettlementPrice " + - ",SUM( kanjia_settlement_price ) AS kanjiaSettlementPrice " + - ",SUM( bill_price ) AS billPrice " + + @Select("SELECT IFNULL(SUM( final_price ),0) AS orderPrice,IFNULL(SUM( commission_price ),0) AS commissionPrice" + + ",IFNULL(SUM( distribution_rebate ),0) AS distributionCommission,IFNULL(SUM( site_coupon_commission ),0) AS siteCouponCommission" + + ",IFNULL(SUM( point_settlement_price ),0) AS pointSettlementPrice " + + ",IFNULL(SUM( kanjia_settlement_price ),0) AS kanjiaSettlementPrice " + + ",IFNULL(SUM( bill_price ),0) AS billPrice " + "FROM li_store_flow ${ew.customSqlSegment}") Bill getOrderBill(@Param(Constants.WRAPPER) QueryWrapper queryWrapper); @@ -49,8 +49,8 @@ public interface BillMapper extends BaseMapper { * @param queryWrapper 查询条件 * @return 结算单 */ - @Select("SELECT SUM( final_price ) AS refundPrice,SUM( commission_price ) AS refundCommissionPrice" + - ",SUM( distribution_rebate ) AS distributionRefundCommission,SUM( site_coupon_commission ) AS siteCouponRefundCommission" + - ",SUM( final_price ) AS billPrice FROM li_store_flow ${ew.customSqlSegment}") + @Select("SELECT IFNULL(SUM( final_price ),0) AS refundPrice,IFNULL(SUM( commission_price ),0) AS refundCommissionPrice" + + ",IFNULL(SUM( distribution_rebate ),0) AS distributionRefundCommission,IFNULL(SUM( site_coupon_commission ),0) AS siteCouponRefundCommission" + + ",IFNULL(SUM( final_price ),0) AS billPrice FROM li_store_flow ${ew.customSqlSegment}") Bill getRefundBill(@Param(Constants.WRAPPER) QueryWrapper queryWrapper); } \ No newline at end of file diff --git a/framework/src/main/java/cn/lili/modules/store/serviceimpl/BillServiceImpl.java b/framework/src/main/java/cn/lili/modules/store/serviceimpl/BillServiceImpl.java index d74c4339..3b9e2f1d 100644 --- a/framework/src/main/java/cn/lili/modules/store/serviceimpl/BillServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/store/serviceimpl/BillServiceImpl.java @@ -103,7 +103,7 @@ public class BillServiceImpl extends ServiceImpl implements Bi //分销订单退还,返现佣金返还 bill.setDistributionRefundCommission(refundBill.getDistributionRefundCommission()); //退货平台优惠券补贴返还 - bill.setSiteCouponRefundCommission(refundBill.getSiteCouponRefundCommission()!=null?refundBill.getSiteCouponRefundCommission():0D); + bill.setSiteCouponRefundCommission(refundBill.getSiteCouponRefundCommission()); //退款金额=店铺最终退款结算金额 refundPrice = refundBill.getBillPrice(); }