ソースを参照

fix 订单撤销二维码

liub 4 ヶ月 前
親
コミット
53ca8450a3

+ 6 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/QrCodeController.java

@@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 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.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.servlet.ModelAndView;
 import org.springframework.web.servlet.ModelAndView;
@@ -108,7 +109,11 @@ public class QrCodeController extends BaseController {
 
 
     @PostMapping(value = "/destroyQrCode")
     @PostMapping(value = "/destroyQrCode")
     @Operation(summary = "销毁二维码")
     @Operation(summary = "销毁二维码")
-    public ModelAndView destroyQrCode(@NotBlank(message = "订单号号不能为空") @RequestParam("orderNo") String orderNo) {
+    public ModelAndView destroyQrCode(@RequestBody JSONObject body) {
+        String orderNo = body.getString("orderNo");
+        if (StringUtils.isBlank(orderNo)) {
+            throw new IllegalArgumentException("订单号不能为空");
+        }
         ModelAndView modelAndView = new ModelAndView(new MappingJackson2JsonView());
         ModelAndView modelAndView = new ModelAndView(new MappingJackson2JsonView());
         insOrdersQrcodeService.destroyQrCode(orderNo);
         insOrdersQrcodeService.destroyQrCode(orderNo);
         modelAndView.addObject("code", 200);
         modelAndView.addObject("code", 200);