Bladeren bron

首信易

xiongzhu 4 jaren geleden
bovenliggende
commit
67ab8fb5ad

+ 7 - 0
src/main/java/com/izouma/nineth/service/OrderPayService.java

@@ -103,6 +103,13 @@ public class OrderPayService {
                         System.currentTimeMillis()));
     }
 
+    public void payOrderAgreement(Long orderId) {
+        Order order = orderRepo.findById(orderId).orElseThrow(new BusinessException("订单不存在"));
+        if (order.getStatus() != OrderStatus.NOT_PAID) {
+            throw new BusinessException("订单状态错误");
+        }
+    }
+
     @Cacheable(value = "payOrder", key = "'gift#'+#orderId")
     public String payGiftOrder(Long orderId) {
         GiftOrder order = giftOrderRepo.findById(orderId).orElseThrow(new BusinessException("订单不存在"));

+ 8 - 0
src/main/java/com/izouma/nineth/web/OrderPayController.java

@@ -108,6 +108,14 @@ public class OrderPayController {
         return sandPayService.payOrderQuick(id);
     }
 
+    @ApiOperation("衫德h5快捷")
+    @RequestMapping(value = "/agreementPay", method = RequestMethod.GET, produces = "text/html")
+    @ResponseBody
+    public String agreementPay(@RequestParam Long id) {
+//        return (String) orderService.payAdapay(id, "alipay_wap", null);
+        return sandPayService.payOrderQuick(id);
+    }
+
     @RequestMapping(value = "/gift/alipay_h5", method = RequestMethod.GET)
     @ResponseBody
     public String payGiftOrderAlipayH5(Long id, Model model) throws BaseAdaPayException {