1
0
fushengqian 11 сар өмнө
parent
commit
c2cbbe7c79

+ 2 - 7
fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendDoConfirmController.java

@@ -156,7 +156,7 @@ public class BackendDoConfirmController extends BaseController {
     @RequestMapping(value = "/doConfirm", method = RequestMethod.POST)
     @CrossOrigin
     @PreAuthorize("@pms.hasPermission('coupon:confirm:index')")
-    public ResponseObject doConfirm(HttpServletRequest request, @RequestBody Map<String, Object> param) {
+    public ResponseObject doConfirm(HttpServletRequest request, @RequestBody Map<String, Object> param) throws BusinessCheckException {
         String token = request.getHeader("Access-Token");
         String userCouponId = param.get("userCouponId") == null ? "" : param.get("userCouponId").toString();
         String amount = (param.get("amount") == null || StringUtil.isEmpty(param.get("amount").toString())) ? "0" : param.get("amount").toString();
@@ -178,12 +178,7 @@ public class BackendDoConfirmController extends BaseController {
             return getFailureResult(201, "储值卡核销金额不能为空");
         }
 
-        try {
-            couponService.useCoupon(Integer.parseInt(userCouponId), accountInfo.getId(), storeId, 0, new BigDecimal(amount), remark);
-        } catch (BusinessCheckException e) {
-            return getFailureResult(201, "核销失败:" + e.getMessage());
-        }
-
+        couponService.useCoupon(Integer.parseInt(userCouponId), accountInfo.getId(), storeId, 0, new BigDecimal(amount), remark);
         return getSuccessResult(true);
     }
 }

+ 1 - 5
fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSubMessageController.java

@@ -75,11 +75,7 @@ public class BackendSubMessageController extends BaseController {
             e.setTitle(wxMessageEnum.getValue());
             JSONObject jsonObject = null;
             if (setting != null) {
-                try {
-                    jsonObject = JSONObject.parseObject(setting.getValue());
-                } catch (Exception ex) {
-                    // empty
-                }
+                jsonObject = JSONObject.parseObject(setting.getValue());
                 if (jsonObject != null) {
                     String templateId = jsonObject.get("templateId").toString();
                     String tid = jsonObject.get("tid").toString();