zouxuan 4 vuotta sitten
vanhempi
commit
ea8df88899

+ 2 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRepairServiceImpl.java

@@ -250,6 +250,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
         }
         String orderNo1 = studentGoodsSell.getOrderNo();
         String orderNo = idGeneratorService.generatorId("payment") + "";
+
         studentGoodsSell.setOrderNo(orderNo);
         StudentPaymentOrder studentPaymentOrder = null;
         if(StringUtils.isNotEmpty(orderNo1)){
@@ -265,10 +266,8 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
             if (studentPaymentOrder.getBalancePaymentAmount() != null && studentPaymentOrder.getBalancePaymentAmount().compareTo(BigDecimal.ZERO) > 0) {
                 sysUserCashAccountService.updateBalance(studentPaymentOrder.getUserId(), studentPaymentOrder.getBalancePaymentAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS, "关闭订单");
             }
-            studentGoodsSellDao.insert(studentGoodsSell);
-        }else {
-            studentGoodsSellDao.update(studentGoodsSell);
         }
+        studentGoodsSellDao.update(studentGoodsSell);
         studentPaymentOrder = new StudentPaymentOrder();
         studentPaymentOrder.setUserId(studentId);
         studentPaymentOrder.setGroupType(GroupType.GOODS_SELL);