Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into feature/pg

This commit is contained in:
paulGao 2022-04-21 15:12:27 +08:00
commit d46863b5b5
3 changed files with 11 additions and 10 deletions

View File

@ -35,11 +35,11 @@ public interface BillMapper extends BaseMapper<Bill> {
* @param queryWrapper 查询条件 * @param queryWrapper 查询条件
* @return 结算单 * @return 结算单
*/ */
@Select("SELECT SUM( final_price ) AS orderPrice,SUM( commission_price ) AS commissionPrice" + @Select("SELECT IFNULL(SUM( final_price ),0) AS orderPrice,IFNULL(SUM( commission_price ),0) AS commissionPrice" +
",SUM( distribution_rebate ) AS distributionCommission,SUM( site_coupon_commission ) AS siteCouponCommission" + ",IFNULL(SUM( distribution_rebate ),0) AS distributionCommission,IFNULL(SUM( site_coupon_commission ),0) AS siteCouponCommission" +
",SUM( point_settlement_price ) AS pointSettlementPrice " + ",IFNULL(SUM( point_settlement_price ),0) AS pointSettlementPrice " +
",SUM( kanjia_settlement_price ) AS kanjiaSettlementPrice " + ",IFNULL(SUM( kanjia_settlement_price ),0) AS kanjiaSettlementPrice " +
",SUM( bill_price ) AS billPrice " + ",IFNULL(SUM( bill_price ),0) AS billPrice " +
"FROM li_store_flow ${ew.customSqlSegment}") "FROM li_store_flow ${ew.customSqlSegment}")
Bill getOrderBill(@Param(Constants.WRAPPER) QueryWrapper<Bill> queryWrapper); Bill getOrderBill(@Param(Constants.WRAPPER) QueryWrapper<Bill> queryWrapper);
@ -49,8 +49,8 @@ public interface BillMapper extends BaseMapper<Bill> {
* @param queryWrapper 查询条件 * @param queryWrapper 查询条件
* @return 结算单 * @return 结算单
*/ */
@Select("SELECT SUM( final_price ) AS refundPrice,SUM( commission_price ) AS refundCommissionPrice" + @Select("SELECT IFNULL(SUM( final_price ),0) AS refundPrice,IFNULL(SUM( commission_price ),0) AS refundCommissionPrice" +
",SUM( distribution_rebate ) AS distributionRefundCommission,SUM( site_coupon_commission ) AS siteCouponRefundCommission" + ",IFNULL(SUM( distribution_rebate ),0) AS distributionRefundCommission,IFNULL(SUM( site_coupon_commission ),0) AS siteCouponRefundCommission" +
",SUM( final_price ) AS billPrice FROM li_store_flow ${ew.customSqlSegment}") ",IFNULL(SUM( final_price ),0) AS billPrice FROM li_store_flow ${ew.customSqlSegment}")
Bill getRefundBill(@Param(Constants.WRAPPER) QueryWrapper<Bill> queryWrapper); Bill getRefundBill(@Param(Constants.WRAPPER) QueryWrapper<Bill> queryWrapper);
} }

View File

@ -69,7 +69,8 @@ public interface StoreDetailMapper extends BaseMapper<StoreDetail> {
@Select("SELECT store_id,settlement_day FROM li_store_detail " + @Select("SELECT store_id,settlement_day FROM li_store_detail " +
"WHERE settlement_cycle LIKE concat(#{day},',%') " + "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 LIKE concat('%,',#{day})"+
"OR settlement_cycle = #{day}")
List<StoreSettlementDay> getSettlementStore(int day); List<StoreSettlementDay> getSettlementStore(int day);
/** /**

View File

@ -103,7 +103,7 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements Bi
//分销订单退还返现佣金返还 //分销订单退还返现佣金返还
bill.setDistributionRefundCommission(refundBill.getDistributionRefundCommission()); bill.setDistributionRefundCommission(refundBill.getDistributionRefundCommission());
//退货平台优惠券补贴返还 //退货平台优惠券补贴返还
bill.setSiteCouponRefundCommission(refundBill.getSiteCouponRefundCommission()!=null?refundBill.getSiteCouponRefundCommission():0D); bill.setSiteCouponRefundCommission(refundBill.getSiteCouponRefundCommission());
//退款金额=店铺最终退款结算金额 //退款金额=店铺最终退款结算金额
refundPrice = refundBill.getBillPrice(); refundPrice = refundBill.getBillPrice();
} }