Procházet zdrojové kódy

快捷绑卡支付bug

xiongzhu před 3 roky
rodič
revize
315c845fd3

+ 5 - 2
src/main/java/com/izouma/nineth/service/OrderPayService.java

@@ -494,9 +494,12 @@ public class OrderPayService {
         if (order.getStatus() != AuctionOrderStatus.NOT_PAID) {
             throw new BusinessException("订单状态错误");
         }
-        return sandPayService.payQuick(orderId + "", "拍卖:" + order.getName(),
+        IdentityAuth identityAuth = identityAuthRepo.findFirstByUserIdAndStatusAndDelFalseOrderByCreatedAtDesc(order.getUserId(), AuthStatus.SUCCESS)
+                .orElseThrow(new BusinessException("请先完成实名认证"));
+        return sandPayService.payQuickBind(orderId + "", "拍卖:" + order.getName(),
                 order.getTotalPrice(), order.getCreatedAt().plusMinutes(3), Constants.OrderNotifyType.AUCTION,
-                generalProperties.getHost() + "/9th/home");
+                generalProperties.getHost() + "/9th/home",
+                order.getUserId(), identityAuth.getRealName(), identityAuth.getIdNo());
     }
 
     public void payAuctionOrderBalance(Long orderId, Long userId, String tradeCode) {

+ 5 - 5
src/main/java/com/izouma/nineth/web/OrderPayControllerV2.java

@@ -61,7 +61,7 @@ public class OrderPayControllerV2 {
     }
 
     @ApiOperation("衫德h5快捷+绑卡")
-    @RequestMapping(value = "/sandQuickBind", produces = "text/html")
+    @RequestMapping("/sandQuickBind")
     @ResponseBody
     public String sandQuickBind(@RequestParam Long id) {
         return orderPayService.payOrderQuickBind(id);
@@ -108,7 +108,7 @@ public class OrderPayControllerV2 {
         return orderPayService.payGiftQuick(id);
     }
 
-    @RequestMapping(value = "/gift/sandQuickBind", produces = "text/html")
+    @RequestMapping("/gift/sandQuickBind")
     @ResponseBody
     public String payGiftQuickBind(@RequestParam Long id) {
         return orderPayService.payGiftQuickBind(id);
@@ -140,7 +140,7 @@ public class OrderPayControllerV2 {
         return orderPayService.payMintQuick(id);
     }
 
-    @RequestMapping(value = "/mint/sandQuickBind", produces = "text/html")
+    @RequestMapping("/mint/sandQuickBind")
     @ResponseBody
     public String payMintQuickBind(@RequestParam Long id) {
         return orderPayService.payMintQuickBind(id);
@@ -177,7 +177,7 @@ public class OrderPayControllerV2 {
         return orderPayService.rechargeQuick(userId, amount);
     }
 
-    @RequestMapping(value = "/recharge/sandQuickBind", produces = "text/html")
+    @RequestMapping("/recharge/sandQuickBind")
     @ResponseBody
     public String payRechargeQuickBind(@RequestParam Long userId, @RequestParam BigDecimal amount) {
         return orderPayService.rechargeQuickBind(userId, amount);
@@ -203,7 +203,7 @@ public class OrderPayControllerV2 {
         return orderPayService.payAuctionQuick(id);
     }
 
-    @RequestMapping(value = "/auction/sandQuickBind", produces = "text/html")
+    @RequestMapping("/auction/sandQuickBind")
     @ResponseBody
     public String payAuctionQuickBind(@RequestParam Long id) {
         return orderPayService.payAuctionQuickBind(id);