Browse Source

管乐迷商城改造

zouxuan 1 year ago
parent
commit
91fa25bcba

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderGoodsServiceImpl.java

@@ -60,7 +60,7 @@ public class MusicGroupPaymentCalenderGoodsServiceImpl extends ServiceImpl<Music
             //计算原价
             //计算原价
             return goodsList.stream().map(e -> {
             return goodsList.stream().map(e -> {
                 Goods goods = goodsMap.get(e.getGoodsId());
                 Goods goods = goodsMap.get(e.getGoodsId());
-                return goods.getGroupPurchasePrice().multiply(new BigDecimal(e.getNum()));
+                return goods.getDiscountPrice().multiply(new BigDecimal(e.getNum()));
             }).reduce(BigDecimal.ZERO,BigDecimal::add);
             }).reduce(BigDecimal.ZERO,BigDecimal::add);
         }
         }
         return BigDecimal.ZERO;
         return BigDecimal.ZERO;

+ 3 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -1125,6 +1125,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
                 studentPaymentOrder.setType(OrderTypeEnum.SCHOOL_GOODS_PURCHASE);
                 studentPaymentOrder.setType(OrderTypeEnum.SCHOOL_GOODS_PURCHASE);
                 studentPaymentOrder.setGroupType(GroupType.OUTORDER);
                 studentPaymentOrder.setGroupType(GroupType.OUTORDER);
                 studentPaymentOrder.setOrganId(musicGroup.getOrganId());
                 studentPaymentOrder.setOrganId(musicGroup.getOrganId());
+                studentPaymentOrder.setRoutingOrganId(musicGroup.getOrganId());
                 studentPaymentOrder.setExpectAmount(calender.getCurrentTotalAmount());
                 studentPaymentOrder.setExpectAmount(calender.getCurrentTotalAmount());
                 studentPaymentOrder.setStatus(DealStatusEnum.SUCCESS);
                 studentPaymentOrder.setStatus(DealStatusEnum.SUCCESS);
                 studentPaymentOrder.setCreateTime(date);
                 studentPaymentOrder.setCreateTime(date);
@@ -1171,7 +1172,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
                     SellOrder sellOrder = new SellOrder();
                     SellOrder sellOrder = new SellOrder();
                     sellOrder.setGoodsSkuId(goodsDto.getSkuStockId());
                     sellOrder.setGoodsSkuId(goodsDto.getSkuStockId());
                     sellOrder.setOrganSellCost(goodsDto.getOrganCostPrice());
                     sellOrder.setOrganSellCost(goodsDto.getOrganCostPrice());
-                    sellOrder.setOrderId(studentPaymentOrder.getOrganId().longValue());
+                    sellOrder.setOrderId(studentPaymentOrder.getId());
                     sellOrder.setType(StringUtils.endsWithIgnoreCase("INSTRUMENT", calenderGood.getGoodsType()) ? SellTypeEnum.INSTRUMENT
                     sellOrder.setType(StringUtils.endsWithIgnoreCase("INSTRUMENT", calenderGood.getGoodsType()) ? SellTypeEnum.INSTRUMENT
                             : StringUtils.endsWithIgnoreCase("ACCESSORIES", calenderGood.getGoodsType()) ? SellTypeEnum.ACCESSORIES
                             : StringUtils.endsWithIgnoreCase("ACCESSORIES", calenderGood.getGoodsType()) ? SellTypeEnum.ACCESSORIES
                             : StringUtils.endsWithIgnoreCase("TEACHING", calenderGood.getGoodsType()) ? SellTypeEnum.TEACHING
                             : StringUtils.endsWithIgnoreCase("TEACHING", calenderGood.getGoodsType()) ? SellTypeEnum.TEACHING
@@ -1194,6 +1195,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
                     sellOrder.setGoodsName(calenderGood.getGoodsName());
                     sellOrder.setGoodsName(calenderGood.getGoodsName());
                     sellOrder.setAccountType(AccountType.INTERNAL);
                     sellOrder.setAccountType(AccountType.INTERNAL);
                     sellOrder.setCooperationOrganId(studentPaymentOrder.getCooperationId());
                     sellOrder.setCooperationOrganId(studentPaymentOrder.getCooperationId());
+                    sellOrder.setOrganId(studentPaymentOrder.getOrganId());
                     sellOrder.setTransNo(studentPaymentOrder.getTransNo());
                     sellOrder.setTransNo(studentPaymentOrder.getTransNo());
                     sellOrder.setPaymentChannel(studentPaymentOrder.getPaymentChannel());
                     sellOrder.setPaymentChannel(studentPaymentOrder.getPaymentChannel());
                     sellOrder.setMerNo(studentPaymentOrder.getMerNos());
                     sellOrder.setMerNo(studentPaymentOrder.getMerNos());

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml

@@ -105,14 +105,14 @@
     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.StudentPaymentOrder" useGeneratedKeys="true"
     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.StudentPaymentOrder" useGeneratedKeys="true"
             keyColumn="id" keyProperty="id">
             keyColumn="id" keyProperty="id">
         INSERT INTO student_payment_order
         INSERT INTO student_payment_order
-        (group_type_, user_id_, organ_id_, routing_organ_id_, type_, expect_amount_, actual_amount_, com_amount_,
+        (group_type_, user_id_, organ_id_, routing_organ_id_,cooperation_id_ , type_, expect_amount_, actual_amount_, com_amount_,
          per_amount_,
          per_amount_,
          balance_payment_amount_, remit_fee_, course_remit_fee_, trans_no_,
          balance_payment_amount_, remit_fee_, course_remit_fee_, trans_no_,
          status_, memo_, create_time_, update_time_, payment_channel_, payment_business_channel_,
          status_, memo_, create_time_, update_time_, payment_channel_, payment_business_channel_,
          payment_account_no_, mer_nos_, order_no_, music_group_id_, class_group_id_, pay_time_,batch_no_,coupon_code_id_,
          payment_account_no_, mer_nos_, order_no_, music_group_id_, class_group_id_, pay_time_,batch_no_,coupon_code_id_,
          coupon_remit_fee_,activity_id_,activity_buy_num_,tenant_id_,calender_id_)
          coupon_remit_fee_,activity_id_,activity_buy_num_,tenant_id_,calender_id_)
         VALUES (#{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
         VALUES (#{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
-                #{userId}, #{organId}, #{routingOrganId},
+                #{userId}, #{organId}, #{routingOrganId}, #{cooperationId},
                 #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
                 #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
                 #{expectAmount}, #{actualAmount}, #{comAmount}, #{perAmount}, #{balancePaymentAmount},
                 #{expectAmount}, #{actualAmount}, #{comAmount}, #{perAmount}, #{balancePaymentAmount},
                 #{remitFee}, #{courseRemitFee}, #{transNo},
                 #{remitFee}, #{courseRemitFee}, #{transNo},