Browse Source

管乐迷商城改造

zouxuan 1 year ago
parent
commit
38260850f2

+ 6 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentRouteOrderServiceImpl.java

@@ -156,6 +156,11 @@ public class StudentPaymentRouteOrderServiceImpl extends BaseServiceImpl<Long, S
             if (musicGroupPaymentCalender == null) {
                 throw new BizException("学校缴费单号(审核通过)不存在,请核查");
             }
+            if(musicGroupPaymentCalender.getPaymentType() == MusicGroupPaymentCalender.PaymentType.GOODS_PURCHASE){
+                studentPaymentRouteOrder.setSaleAmount(studentPaymentRouteOrder.getRouteAmount());
+            }else {
+                studentPaymentRouteOrder.setServiceAmount(studentPaymentRouteOrder.getRouteAmount());
+            }
         }
         Date nowDate = new Date();
         String orderNo = idGeneratorService.generatorId("payment") + "";
@@ -312,7 +317,6 @@ public class StudentPaymentRouteOrderServiceImpl extends BaseServiceImpl<Long, S
             }
             //同步商城的发货数据
             if(!syncFlag){
-                AccountType accountType = sysPaymentConfigService.checkAccountType(PaymentChannelEnum.valueOf(studentPaymentOrder.getPaymentChannel()), studentPaymentOrder.getMerNos(), studentPaymentOrder.getTenantId());
                 List<MusicGroupPaymentCalenderGoods> calenderGoods = musicGroupPaymentCalenderGoodsService.lambdaQuery()
                         .eq(MusicGroupPaymentCalenderGoods::getCalenderId, studentPaymentRouteOrder.getCalenderId()).list();
                 List<SellOrder> sellOrderList = new ArrayList<>();
@@ -356,7 +360,7 @@ public class StudentPaymentRouteOrderServiceImpl extends BaseServiceImpl<Long, S
                             sellOrder.setParentGoodsId(calenderGood.getGoodsId());
                             sellOrder.setNum(1);
                             sellOrder.setGoodsName(calenderGood.getGoodsName());
-                            sellOrder.setAccountType(accountType);
+                            sellOrder.setAccountType(AccountType.INTERNAL);
                             sellOrder.setCooperationOrganId(musicGroup.getCooperationOrganId());
                             sellOrder.setEduTeacherId(musicGroup.getEducationalTeacherId());
                             sellOrder.setTransNo(studentPaymentOrder.getTransNo());