Bläddra i källkod

Merge branch 'hr_728'

# Conflicts:
#	mec-biz/src/main/java/com/ym/mec/biz/service/impl/CloudTeacherOrderServiceImpl.java
#	mec-biz/src/main/resources/config/mybatis/CloudTeacherOrderMapper.xml
yonge 4 år sedan
förälder
incheckning
9ab38daf02

+ 31 - 13
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -137,6 +137,7 @@ import com.ym.mec.biz.dal.enums.MessageTypeEnum;
 import com.ym.mec.biz.dal.enums.MusicGroupStatusEnum;
 import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
 import com.ym.mec.biz.dal.enums.OrderTypeEnum;
+import com.ym.mec.biz.dal.enums.PayStatus;
 import com.ym.mec.biz.dal.enums.PaymentStatusEnum;
 import com.ym.mec.biz.dal.enums.PeriodEnum;
 import com.ym.mec.biz.dal.enums.PlatformCashAccountDetailTypeEnum;
@@ -1007,10 +1008,20 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 
         Integer userId = studentRegistration.getUserId();
 
-        StudentPaymentOrder ApplyOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId(), DealStatusEnum.ING);
-        if (ApplyOrder == null) {
+        StudentPaymentOrder applyOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId(), DealStatusEnum.ING);
+        if (applyOrder == null) {
             throw new BizException("没有支付中订单,请在我的订单中查看订单状态");
         }
+        
+        // 查询订单状态
+        PayStatus payStatus = studentPaymentOrderService.queryPayStatus(applyOrder.getPaymentChannel(), applyOrder.getOrderNo(), applyOrder.getTransNo());
+        if(payStatus != PayStatus.FAILED){
+        	if(payStatus == PayStatus.SUCCESSED){
+        		throw new BizException("订单已支付成功,请勿重复支付");
+        	}else if(payStatus == PayStatus.PAYING){
+        		throw new BizException("订单还在交易中,请稍后重试");
+        	}
+        }
 
     	MusicGroupPaymentCalender musicGroupRegCalender = musicGroupPaymentCalenderDao.getMusicGroupRegCalender(studentRegistration.getMusicGroupId());
         if(musicGroupRegCalender == null){
@@ -1018,9 +1029,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         }
         
         //手动关闭订单
-        ApplyOrder.setStatus(DealStatusEnum.FAILED);
-        ApplyOrder.setMemo("用户手动关闭");
-        studentPaymentOrderService.callOrderCallBack(ApplyOrder);
+        applyOrder.setStatus(DealStatusEnum.FAILED);
+        applyOrder.setMemo("用户手动关闭");
+        studentPaymentOrderService.callOrderCallBack(applyOrder);
 
         BigDecimal amount = registerPayDto.getAmount(); //前端获取的价格
         BigDecimal orderAmount = new BigDecimal("0");
@@ -2555,14 +2566,21 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         if (calenderDetail.getPaymentOrderId() != null) {
             StudentPaymentOrder oldStudentPaymentOrder = studentPaymentOrderDao.get(calenderDetail.getPaymentOrderId());
             if (oldStudentPaymentOrder != null) {
-                if (oldStudentPaymentOrder.getStatus() == SUCCESS) {
-                    throw new BizException("您已支付请勿重复提交");
-                } else if (oldStudentPaymentOrder.getStatus() == ING) {
-                    oldStudentPaymentOrder.setStatus(CLOSE);
-                    studentPaymentOrderService.update(oldStudentPaymentOrder);
-                    if (oldStudentPaymentOrder.getBalancePaymentAmount() != null && oldStudentPaymentOrder.getBalancePaymentAmount().compareTo(BigDecimal.ZERO) > 0) {
-                        sysUserCashAccountService.updateBalance(oldStudentPaymentOrder.getUserId(), oldStudentPaymentOrder.getBalancePaymentAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS, "关闭订单");
-                    }
+                
+                // 查询订单状态
+                PayStatus payStatus = studentPaymentOrderService.queryPayStatus(oldStudentPaymentOrder.getPaymentChannel(), oldStudentPaymentOrder.getOrderNo(), oldStudentPaymentOrder.getTransNo());
+                if(payStatus != PayStatus.FAILED){
+                	if(payStatus == PayStatus.SUCCESSED){
+                		throw new BizException("订单已支付成功,请勿重复支付");
+                	}else if(payStatus == PayStatus.PAYING){
+                		throw new BizException("订单还在交易中,请稍后重试");
+                	}
+                }
+                
+                oldStudentPaymentOrder.setStatus(CLOSE);
+                studentPaymentOrderService.update(oldStudentPaymentOrder);
+                if (oldStudentPaymentOrder.getBalancePaymentAmount() != null && oldStudentPaymentOrder.getBalancePaymentAmount().compareTo(BigDecimal.ZERO) > 0) {
+                    sysUserCashAccountService.updateBalance(oldStudentPaymentOrder.getUserId(), oldStudentPaymentOrder.getBalancePaymentAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS, "关闭订单");
                 }
             }
         }

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

@@ -1,6 +1,7 @@
 package com.ym.mec.biz.service.impl;
 
 import ch.qos.logback.core.util.StringCollectionUtil;
+
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.*;
@@ -22,8 +23,8 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
-
 import com.ym.mec.util.http.HttpUtil;
+
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -276,6 +277,17 @@ public class ReplacementInstrumentActivityServiceImpl extends BaseServiceImpl<In
         if (replacementInstrumentActivity.getPayStatus().equals(1) && replacementPayDto.getRePay()) {
             StudentPaymentOrder oldOrder = studentPaymentOrderService.getUserReplacementIngOrder(userId, replacementInstrumentActivity.getId());
             if (oldOrder != null) {
+                
+                // 查询订单状态
+                PayStatus payStatus = studentPaymentOrderService.queryPayStatus(oldOrder.getPaymentChannel(), oldOrder.getOrderNo(), oldOrder.getTransNo());
+                if(payStatus != PayStatus.FAILED){
+                	if(payStatus == PayStatus.SUCCESSED){
+                		throw new BizException("订单已支付成功,请勿重复支付");
+                	}else if(payStatus == PayStatus.PAYING){
+                		throw new BizException("订单还在交易中,请稍后重试");
+                	}
+                }
+                
                 oldOrder.setStatus(DealStatusEnum.FAILED);
                 oldOrder.setMemo("用户手动关闭");
                 studentPaymentOrderService.callOrderCallBack(oldOrder);

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SubjectChangeServiceImpl.java

@@ -117,6 +117,17 @@ public class SubjectChangeServiceImpl extends BaseServiceImpl<Integer, SubjectCh
         SubjectChange subjectChange = subjectChangeDao.get(id);
         if (isRepay) {
             StudentPaymentOrder studentPaymentOrder = studentPaymentOrderService.get(subjectChange.getOrderId().longValue());
+            
+            // 查询订单状态
+            PayStatus payStatus = studentPaymentOrderService.queryPayStatus(studentPaymentOrder.getPaymentChannel(), studentPaymentOrder.getOrderNo(), studentPaymentOrder.getTransNo());
+            if(payStatus != PayStatus.FAILED){
+            	if(payStatus == PayStatus.SUCCESSED){
+            		throw new BizException("订单已支付成功,请勿重复支付");
+            	}else if(payStatus == PayStatus.PAYING){
+            		throw new BizException("订单还在交易中,请稍后重试");
+            	}
+            }
+            
             studentPaymentOrder.setStatus(DealStatusEnum.CLOSE);
             studentPaymentOrder.setUpdateTime(date);
             studentPaymentOrderService.update(studentPaymentOrder);

+ 3 - 3
mec-biz/src/main/resources/config/mybatis/CloudTeacherOrderMapper.xml

@@ -22,7 +22,7 @@
         <result column="update_time_" property="updateTime"/>
         <result column="music_group_id_" property="musicGroupId"/>
     </resultMap>
-
+    
     <resultMap type="com.ym.mec.biz.dal.dto.CloudTeacherOrderDto" id="CloudTeacherOrderDto">
     	<id column="id_" property="cloudTeacherOrder.id"/>
         <result column="organ_id_" property="cloudTeacherOrder.organId"/>
@@ -186,9 +186,9 @@
         SELECT cto.* FROM cloud_teacher_order cto
         WHERE order_id_ = #{orderId}
     </select>
-
+    
     <select id="queryOrderInfoByOrderId" resultMap="CloudTeacherOrderDto">
-        SELECT cto.*,spo.status_ trans_status_,spo.expect_amount_,mrs.name_,mrs.icon_ FROM cloud_teacher_order cto
+	SELECT cto.*,spo.status_ trans_status_,spo.expect_amount_,mrs.name_,mrs.icon_ FROM cloud_teacher_order cto
         left join student_payment_order spo on cto.order_id_ = spo.id_
         left join member_rank_setting mrs on mrs.id_ = cto.level_
         where spo.type_ = 'MEMBER' and order_id_ = #{orderId}

+ 19 - 2
mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java

@@ -45,6 +45,7 @@ import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.biz.dal.enums.MusicGroupStatusEnum;
 import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
 import com.ym.mec.biz.dal.enums.OrderTypeEnum;
+import com.ym.mec.biz.dal.enums.PayStatus;
 import com.ym.mec.biz.dal.enums.PaymentStatusEnum;
 import com.ym.mec.biz.service.MusicGroupService;
 import com.ym.mec.biz.service.MusicGroupSubjectPlanService;
@@ -252,6 +253,14 @@ public class MusicGroupController extends BaseController {
             List<StudentPaymentOrder> list = studentPaymentOrderService.queryByCondition(GroupType.MUSIC, calender.getMusicGroupId(), userId, DealStatusEnum.ING,
                     OrderTypeEnum.RENEW);
             if (list.size() > 0) {
+            	StudentPaymentOrder applyOrder = list.get(0);
+            	// 查询订单状态
+                PayStatus payStatus = studentPaymentOrderService.queryPayStatus(applyOrder.getPaymentChannel(), applyOrder.getOrderNo(), applyOrder.getTransNo());
+                if(payStatus == PayStatus.SUCCESSED){
+            		throw new BizException("订单已支付成功,请勿重复支付");
+            	}else if(payStatus == PayStatus.PAYING){
+            		throw new BizException("订单还在交易中,请稍后重试");
+            	}
                 return failed(HttpStatus.CONTINUE, "您有待支付的订单");
             }
         }
@@ -336,8 +345,16 @@ public class MusicGroupController extends BaseController {
             return failed("您已支付成功,请勿重复支付");
         }*/
         //判断用户是否已存在订单
-        StudentPaymentOrder ApplyOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId(), DealStatusEnum.ING);
-        if (ApplyOrder != null) {
+        StudentPaymentOrder applyOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId(), DealStatusEnum.ING);
+        
+        if (applyOrder != null) {
+        	// 查询订单状态
+            PayStatus payStatus = studentPaymentOrderService.queryPayStatus(applyOrder.getPaymentChannel(), applyOrder.getOrderNo(), applyOrder.getTransNo());
+            if(payStatus == PayStatus.SUCCESSED){
+        		throw new BizException("订单已支付成功,请勿重复支付");
+        	}else if(payStatus == PayStatus.PAYING){
+        		throw new BizException("订单还在交易中,请稍后重试");
+        	}
             return failed(HttpStatus.CONTINUE, "您有待支付的订单");
         }
         Map payMap = musicGroupService.pay(registerPayDto);

+ 16 - 0
mec-student/src/main/java/com/ym/mec/student/controller/ReplacementInstrumentActivityController.java

@@ -7,15 +7,20 @@ import com.ym.mec.biz.dal.dto.ReplacementInstrumentActivityStatDto;
 import com.ym.mec.biz.dal.dto.ReplacementPayDto;
 import com.ym.mec.biz.dal.entity.ReplacementInstrumentActivity;
 import com.ym.mec.biz.dal.entity.ReplacementInstrumentCooperation;
+import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
+import com.ym.mec.biz.dal.enums.PayStatus;
 import com.ym.mec.biz.service.ReplacementInstrumentActivityService;
 import com.ym.mec.biz.service.ReplacementInstrumentCooperationService;
+import com.ym.mec.biz.service.StudentPaymentOrderService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.exception.BizException;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.*;
@@ -33,6 +38,8 @@ public class ReplacementInstrumentActivityController extends BaseController {
     private SysUserFeignService sysUserFeignService;
     @Autowired
     private ReplacementInstrumentCooperationService replacementInstrumentCooperationService;
+    @Autowired
+    private StudentPaymentOrderService studentPaymentOrderService;
 
     @ApiOperation(value = "新增调查问卷")
     @PostMapping("/insert")
@@ -162,6 +169,15 @@ public class ReplacementInstrumentActivityController extends BaseController {
         }
         //判断用户是否已存在订单
         if (replacementInstrumentActivity.getPayStatus().equals(1) && !replacementPayDto.getRePay()) {
+        	
+        	StudentPaymentOrder applyOrder = studentPaymentOrderService.getUserReplacementIngOrder(replacementInstrumentActivity.getUserId(), replacementInstrumentActivity.getId());
+        	// 查询订单状态
+            PayStatus payStatus = studentPaymentOrderService.queryPayStatus(applyOrder.getPaymentChannel(), applyOrder.getOrderNo(), applyOrder.getTransNo());
+            if(payStatus == PayStatus.SUCCESSED){
+        		throw new BizException("订单已支付成功,请勿重复支付");
+        	}else if(payStatus == PayStatus.PAYING){
+        		throw new BizException("订单还在交易中,请稍后重试");
+        	}
             return failed(HttpStatus.CONTINUE, "您有待支付的订单");
         }
         Map payMap = replacementInstrumentActivityService.pay(replacementPayDto);

+ 32 - 15
mec-student/src/main/java/com/ym/mec/student/controller/SporadicChargeInfoController.java

@@ -1,29 +1,35 @@
 package com.ym.mec.student.controller;
 
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.dal.dao.SysUserCashAccountDao;
+import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
 import com.ym.mec.biz.dal.dto.SporadicPayDto;
 import com.ym.mec.biz.dal.entity.SporadicChargeInfo;
-import com.ym.mec.biz.dal.entity.SysUserCashAccount;
+import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.enums.DealStatusEnum;
+import com.ym.mec.biz.dal.enums.PayStatus;
 import com.ym.mec.biz.service.MusicGroupService;
 import com.ym.mec.biz.service.SporadicChargeInfoService;
 import com.ym.mec.biz.service.StudentPaymentOrderService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.exception.BizException;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.*;
-
-import java.math.BigDecimal;
-import java.util.HashMap;
-import java.util.Map;
 
 @RequestMapping("sporadicChargeInfo")
 @Api(tags = "零星收费")
@@ -37,6 +43,8 @@ public class SporadicChargeInfoController extends BaseController {
     @Autowired
     private StudentPaymentOrderService studentPaymentOrderService;
     @Autowired
+    private StudentPaymentOrderDao studentPaymentOrderDao;
+    @Autowired
     private MusicGroupService musicGroupService;
 
     @ApiOperation(value = "单查询")
@@ -65,8 +73,17 @@ public class SporadicChargeInfoController extends BaseController {
             sporadicPayDto.setUserId(sysUser.getId());
         }
         if (sporadicPayDto.getIsRepeatPay() == false) {
-            Integer ingOrder = studentPaymentOrderService.findOrderByGroupType(sporadicPayDto.getUserId(), sporadicPayDto.getSporadicId(), "SPORADIC", DealStatusEnum.ING);
-            if (ingOrder != null && ingOrder > 0) {
+        	List<StudentPaymentOrder> studentPaymentOrderList = studentPaymentOrderDao.findPaymentOrderByGroupType(sporadicPayDto.getUserId(), sporadicPayDto.getSporadicId(), "SPORADIC", DealStatusEnum.ING);
+            if (studentPaymentOrderList != null && studentPaymentOrderList.size() > 0) {
+            	StudentPaymentOrder applyOrder = studentPaymentOrderList.get(0);
+            	// 查询订单状态
+                PayStatus payStatus = studentPaymentOrderService.queryPayStatus(applyOrder.getPaymentChannel(), applyOrder.getOrderNo(), applyOrder.getTransNo());
+                if(payStatus == PayStatus.SUCCESSED){
+            		throw new BizException("订单已支付成功,请勿重复支付");
+            	}else if(payStatus == PayStatus.PAYING){
+            		throw new BizException("订单还在交易中,请稍后重试");
+            	}
+                
                 return failed(HttpStatus.CONTINUE, "您有待支付的订单");
             }
         }

+ 12 - 0
mec-student/src/main/java/com/ym/mec/student/controller/StudentVipGroupController.java

@@ -9,15 +9,19 @@ import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.biz.dal.enums.OrderTypeEnum;
+import com.ym.mec.biz.dal.enums.PayStatus;
 import com.ym.mec.biz.dal.page.StudentVipGroupQueryInfo;
 import com.ym.mec.biz.service.StudentPaymentOrderService;
 import com.ym.mec.biz.service.SubjectService;
 import com.ym.mec.biz.service.VipGroupCategoryService;
 import com.ym.mec.biz.service.VipGroupService;
 import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.exception.BizException;
 import com.yonge.log.model.AuditLogAnnotation;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.*;
@@ -110,6 +114,14 @@ public class StudentVipGroupController extends BaseController {
                             DealStatusEnum.ING,
                             OrderTypeEnum.SMALL_CLASS_TO_BUY);
             if (list.size() > 0) {
+            	StudentPaymentOrder applyOrder = list.get(0);
+            	// 查询订单状态
+                PayStatus payStatus = studentPaymentOrderService.queryPayStatus(applyOrder.getPaymentChannel(), applyOrder.getOrderNo(), applyOrder.getTransNo());
+                if(payStatus == PayStatus.SUCCESSED){
+            		throw new BizException("订单已支付成功,请勿重复支付");
+            	}else if(payStatus == PayStatus.PAYING){
+            		throw new BizException("订单还在交易中,请稍后重试");
+            	}
                 return failed(HttpStatus.CONTINUE, "您有待支付的订单");
             }
         }

+ 17 - 0
mec-student/src/main/java/com/ym/mec/student/controller/SubjectChangeController.java

@@ -1,15 +1,21 @@
 package com.ym.mec.student.controller;
 
 import com.ym.mec.biz.dal.dao.SubjectChangeDao;
+import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.entity.SubjectChange;
+import com.ym.mec.biz.dal.enums.PayStatus;
 import com.ym.mec.biz.dal.enums.SubjectChangeStatusEnum;
+import com.ym.mec.biz.service.StudentPaymentOrderService;
 import com.ym.mec.biz.service.SubjectChangeService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
+import com.ym.mec.common.exception.BizException;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -30,6 +36,8 @@ public class SubjectChangeController extends BaseController {
     private SubjectChangeService subjectChangeService;
     @Autowired
     private SubjectChangeDao subjectChangeDao;
+    @Autowired
+    private StudentPaymentOrderService studentPaymentOrderService;
 
 
     @ApiOperation(value = "获取更换详情")
@@ -51,6 +59,15 @@ public class SubjectChangeController extends BaseController {
     public HttpResponseResult<Map> payChange(Integer id, BigDecimal amount, Boolean isUseBalancePayment, Boolean isRepay) throws Exception {
         SubjectChange subjectChange = subjectChangeDao.get(id);
         if (!isRepay && subjectChange.getStatus().equals(SubjectChangeStatusEnum.ING)) {
+        	
+            StudentPaymentOrder applyOrder = studentPaymentOrderService.get(subjectChange.getOrderId().longValue());
+        	// 查询订单状态
+            PayStatus payStatus = studentPaymentOrderService.queryPayStatus(applyOrder.getPaymentChannel(), applyOrder.getOrderNo(), applyOrder.getTransNo());
+            if(payStatus == PayStatus.SUCCESSED){
+        		throw new BizException("订单已支付成功,请勿重复支付");
+        	}else if(payStatus == PayStatus.PAYING){
+        		throw new BizException("订单还在交易中,请稍后重试");
+        	}
             return failed(HttpStatus.CONTINUE, "您有待支付的订单");
         }
         Map payMap = subjectChangeService.payChange(id, amount, isUseBalancePayment, isRepay);