zouxuan 4 년 전
부모
커밋
ea8df88899
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRepairServiceImpl.java

+ 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);