Bladeren bron

Merge branch 'fix_callback'

周箭河 4 jaren geleden
bovenliggende
commit
2e75775347

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

@@ -315,7 +315,7 @@ public class DegreeRegistrationServiceImpl extends BaseServiceImpl<Integer, Degr
             notifyMap.put("channelType", channelType);
             notifyMap.put("orderNo", "");
             studentPaymentOrderService.updateOrder(notifyMap);
-            return BaseController.failed(HttpStatus.CREATED, "恭喜您,支付成功!");
+            return BaseController.failed(HttpStatus.CREATED, notifyMap,"恭喜您,支付成功!");
         }
 
         String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
@@ -511,7 +511,7 @@ public class DegreeRegistrationServiceImpl extends BaseServiceImpl<Integer, Degr
             notifyMap.put("channelType", channelType);
             notifyMap.put("orderNo", "");
             studentPaymentOrderService.updateOrder(notifyMap);
-            return BaseController.failed(HttpStatus.CREATED, "恭喜您,支付成功!");
+            return BaseController.failed(HttpStatus.CREATED, notifyMap,"恭喜您,支付成功!");
         }
 
         String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");

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

@@ -230,7 +230,7 @@ public class MusicGroupController extends BaseController {
             throw new BizException("缴费暂未开始,如有问题请联系指导老师");
         }
         if (renew.containsKey("tradeState")) {
-            return failed(HttpStatus.CREATED, "恭喜您,缴费成功!");
+            return failed(HttpStatus.CREATED, renew,"恭喜您,缴费成功!");
         }
         return succeed(renew);
     }
@@ -299,7 +299,7 @@ public class MusicGroupController extends BaseController {
         }
         Map payMap = musicGroupService.pay(registerPayDto);
         if (payMap.containsKey("tradeState")) {
-            return failed(HttpStatus.CREATED, "恭喜您,报名成功!");
+            return failed(HttpStatus.CREATED, payMap,"恭喜您,报名成功!");
         }
         return succeed(payMap);
     }
@@ -325,7 +325,7 @@ public class MusicGroupController extends BaseController {
         }
         Map payMap = musicGroupService.rePay(registerPayDto);
         if (payMap.containsKey("tradeState")) {
-            return failed(HttpStatus.CREATED, "恭喜您,报名成功!");
+            return failed(HttpStatus.CREATED, payMap,"恭喜您,报名成功!");
         }
         return succeed(payMap);
     }

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

@@ -74,7 +74,7 @@ public class RepairController extends BaseController {
         studentGoodsSell.setAuthorUser(studentGoodsSell.getUserId());
         Map map = studentRepairService.addGoodsSellOrder(studentGoodsSell);
         if(map.containsKey("tradeState")){
-            return failed(HttpStatus.CREATED, "恭喜您,购买成功!");
+            return failed(HttpStatus.CREATED, map,"恭喜您,购买成功!");
         }
         return succeed(map);
     }
@@ -84,7 +84,7 @@ public class RepairController extends BaseController {
     public HttpResponseResult studentPaymentGoodsOrder(Integer goodsSellId) throws Exception {
         Map map = studentRepairService.studentPaymentGoodsOrder(goodsSellId);
         if(map.containsKey("tradeState")){
-            return failed(HttpStatus.CREATED, "恭喜您,购买成功!");
+            return failed(HttpStatus.CREATED, map,"恭喜您,购买成功!");
         }
         return succeed(map);
     }

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

@@ -20,6 +20,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.Map;
+
 @RequestMapping("replacementInstrumentActivity")
 @Api(tags = "乐器置换调查问卷")
 @RestController
@@ -162,6 +164,10 @@ public class ReplacementInstrumentActivityController extends BaseController {
         if (replacementInstrumentActivity.getPayStatus().equals(1) && !replacementPayDto.getRePay()) {
             return failed(HttpStatus.CONTINUE, "您有待支付的订单");
         }
+        Map payMap = replacementInstrumentActivityService.pay(replacementPayDto);
+        if (payMap.containsKey("tradeState")) {
+            return failed(HttpStatus.CREATED, payMap, "恭喜您,支付成功!");
+        }
         return succeed(replacementInstrumentActivityService.pay(replacementPayDto));
     }
 }

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

@@ -78,7 +78,7 @@ public class SporadicChargeInfoController extends BaseController {
                 try {
                     Map payMap = musicGroupService.sporadicPay(sporadicPayDto);
                     if (payMap.containsKey("tradeState")) {
-                        return failed(HttpStatus.CREATED, "恭喜您,支付成功!");
+                        return failed(HttpStatus.CREATED, payMap,"恭喜您,支付成功!");
                     }
                     return succeed(payMap);
                 } catch (Exception e) {
@@ -97,7 +97,7 @@ public class SporadicChargeInfoController extends BaseController {
 
         Map payMap = musicGroupService.sporadicPay(sporadicPayDto);
         if (payMap.containsKey("tradeState")) {
-            return failed(HttpStatus.CREATED, "恭喜您,支付成功!");
+            return failed(HttpStatus.CREATED, payMap,"恭喜您,支付成功!");
         }
         return succeed(payMap);
     }

+ 6 - 1
mec-student/src/main/java/com/ym/mec/student/controller/StudentInstrumentController.java

@@ -23,6 +23,7 @@ import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.*;
 
 import java.math.BigDecimal;
+import java.util.Map;
 
 @RequestMapping("studentInstrument")
 @Api(tags = "乐器与乐保服务")
@@ -51,6 +52,10 @@ public class StudentInstrumentController extends BaseController {
     @PostMapping("/pay")
     @ApiImplicitParams({@ApiImplicitParam(name = "maintenancePayDto", value = "支付参数", required = true, dataType = "MaintenancePayDto")})
     public HttpResponseResult pay(MaintenancePayDto maintenancePayDto) throws Exception {
-        return succeed(studentInstrumentService.pay(maintenancePayDto));
+        Map payMap = studentInstrumentService.pay(maintenancePayDto);
+        if (payMap.containsKey("tradeState")) {
+            return failed(HttpStatus.CREATED, payMap, "恭喜您,支付成功!");
+        }
+        return succeed(payMap);
     }
 }

+ 5 - 1
mec-student/src/main/java/com/ym/mec/student/controller/SubjectChangeController.java

@@ -53,7 +53,11 @@ public class SubjectChangeController extends BaseController {
         if (!isRepay && subjectChange.getStatus().equals(SubjectChangeStatusEnum.ING)) {
             return failed(HttpStatus.CONTINUE, "您有待支付的订单");
         }
-        return succeed(subjectChangeService.payChange(id, amount, isUseBalancePayment, isRepay));
+        Map payMap = subjectChangeService.payChange(id, amount, isUseBalancePayment, isRepay);
+        if (payMap.containsKey("tradeState")) {
+            return failed(HttpStatus.CREATED, payMap, "恭喜您,支付成功!");
+        }
+        return succeed(payMap);
     }
 
 

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/education/EduRepairController.java

@@ -95,7 +95,7 @@ public class EduRepairController extends BaseController {
         studentGoodsSell.setAuthorUser(sysUser.getId());
         Map map = studentRepairService.addGoodsSellOrder(studentGoodsSell);
         if(map.containsKey("tradeState")){
-            return failed(HttpStatus.CREATED, "恭喜您,购买成功!");
+            return failed(HttpStatus.CREATED, map,"恭喜您,购买成功!");
         }
         return succeed(map);
     }