|
@@ -34,6 +34,8 @@ import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
+import static com.ym.mec.biz.dal.enums.DealStatusEnum.*;
|
|
|
+
|
|
|
@Service
|
|
|
public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRepair> implements StudentRepairService {
|
|
|
private static final Logger log = LoggerFactory.getLogger(StudentRepairServiceImpl.class);
|
|
@@ -117,10 +119,15 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
} else {
|
|
|
studentGoodsSell.setIsUseBalancePayment(false);
|
|
|
}
|
|
|
- orderByOrderNo.setStatus(DealStatusEnum.CLOSE);
|
|
|
- studentPaymentOrderService.update(orderByOrderNo);
|
|
|
- if (orderByOrderNo.getBalancePaymentAmount() != null && orderByOrderNo.getBalancePaymentAmount().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
- sysUserCashAccountService.updateBalance(orderByOrderNo.getUserId(), orderByOrderNo.getBalancePaymentAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS, "关闭订单");
|
|
|
+
|
|
|
+ if (orderByOrderNo.getStatus() == SUCCESS) {
|
|
|
+ throw new BizException("您已支付请勿重复提交");
|
|
|
+ }else if(orderByOrderNo.getStatus() == ING){
|
|
|
+ orderByOrderNo.setStatus(CLOSE);
|
|
|
+ studentPaymentOrderService.update(orderByOrderNo);
|
|
|
+ if (orderByOrderNo.getBalancePaymentAmount() != null && orderByOrderNo.getBalancePaymentAmount().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
+ sysUserCashAccountService.updateBalance(orderByOrderNo.getUserId(), orderByOrderNo.getBalancePaymentAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS, "关闭订单");
|
|
|
+ }
|
|
|
}
|
|
|
StudentGoodsSell byOrderNo = studentGoodsSellDao.findByOrderNo(studentGoodsSell.getOrderNo());
|
|
|
if (byOrderNo != null) {
|