diff --git a/mall-common/src/main/java/com/suisung/mall/common/exception/GlobalExceptionHandler.java b/mall-common/src/main/java/com/suisung/mall/common/exception/GlobalExceptionHandler.java index 0f7d1f78..cd615e1e 100644 --- a/mall-common/src/main/java/com/suisung/mall/common/exception/GlobalExceptionHandler.java +++ b/mall-common/src/main/java/com/suisung/mall/common/exception/GlobalExceptionHandler.java @@ -21,8 +21,6 @@ public class GlobalExceptionHandler { @ExceptionHandler(value = Exception.class) public CommonResult exceptionHandler(HttpServletRequest req, Exception e) { - - // 获取异常的第一帧堆栈信息 StackTraceElement[] stackTrace = e.getStackTrace(); String location = "未知位置"; @@ -42,28 +40,17 @@ public class GlobalExceptionHandler { location, e); - return CommonResult.failed("系统异常:" + location); - -// logger.error("Exception全局异常捕获-" + e.getMessage(), e); -// return CommonResult.failed(); + return CommonResult.failed("系统异常:" + e.getMessage()); } @ExceptionHandler(value = ApiException.class) public CommonResult exceptionHandler(HttpServletRequest req, ApiException e) { -// IErrorCode errorCode = e.getErrorCode(); -// String message = e.getMessage(); -// logger.error("ApiException全局异常捕获-" + e.getMessage(), e); -// if (errorCode != null) { -// return CommonResult.failed(errorCode); -// } else if (StrUtil.isNotBlank(message)) { -// return CommonResult.failed(message); -// } else { -// return CommonResult.failed(ResultCode.FAILED); -// } - // 获取异常位置信息 StackTraceElement[] stackTrace = e.getStackTrace(); - String location = "未知位置"; + String location = "未知错误位置"; + + IErrorCode errorCode = e.getErrorCode(); + String message = e.getMessage(); if (stackTrace.length > 0) { StackTraceElement element = stackTrace[0]; // 第一个异常抛出点 @@ -74,20 +61,18 @@ public class GlobalExceptionHandler { ); } - IErrorCode errorCode = e.getErrorCode(); - String message = e.getMessage(); - logger.error("Exception全局异常捕获 URI: {} - Method: {} - Error: {} at {}", + logger.error("Exception全局异常捕获 URI:{} - Method:{} - Error:{} at {}", req.getRequestURI(), req.getMethod(), - e.getMessage(), + message, location, e); if (errorCode != null) { - return CommonResult.failed(errorCode); + return CommonResult.failed(message); } else if (StrUtil.isNotBlank(message)) { - return CommonResult.failed("业务异常:" + message + " [" + location + "]"); + return CommonResult.failed("系统异常:" + message + " [" + location + "]"); } else { return CommonResult.failed(ResultCode.FAILED); } diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/lakala/service/impl/LakalaApiServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/lakala/service/impl/LakalaApiServiceImpl.java index e0dcd8ce..9783f394 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/lakala/service/impl/LakalaApiServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/lakala/service/impl/LakalaApiServiceImpl.java @@ -89,6 +89,8 @@ public class LakalaApiServiceImpl implements LakalaApiService { private String orgCode; @Value("${lakala.tk.split_lowest_ratio}") private String splitLowestRatio; + @Value("${lakala.tk.wx_fee}") + private String wxFee; @Value("${project.domain}") private String projectDomain; @Value("${spring.profiles.active}") @@ -546,13 +548,9 @@ public class LakalaApiServiceImpl implements LakalaApiService { String signDate = today.getYear() + "-" + today.getMonthValue() + "-" + today.getDayOfMonth(); String platformName = "桂平发发网络有限公司"; - String ratioNum = "0.6"; - if (isLklProd) { - ratioNum = "0.25"; - } JSONObject ecParams = new JSONObject(); ecParams.put("A1", isQy ? shopMchEntry.getBiz_license_company() : shopMchEntry.getAccount_holder_name()); - ecParams.put("A30", ratioNum); // 测试环境微信费率0.6 + ecParams.put("A30", wxFee); // 测试环境微信费率0.6 ecParams.put("A96", "1"); ecParams.put("A97", "是"); ecParams.put("A100", "是"); diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/lakala/service/impl/LklTkServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/lakala/service/impl/LklTkServiceImpl.java index c4f7e15f..e64e38e5 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/lakala/service/impl/LklTkServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/lakala/service/impl/LklTkServiceImpl.java @@ -68,6 +68,9 @@ public class LklTkServiceImpl { @Value("${lakala.tk.notify_pub_key_path}") private String notifyPubKeyPath; + @Value("${lakala.tk.wx_fee}") + private String wxFee; + @Value("${spring.profiles.active}") private String profile; @@ -398,7 +401,7 @@ public class LklTkServiceImpl { formData.put("countyCode", areaCode.get("countyCode")); } - //结算信息省市信息 + //银行结算信息省市信息 if (StrUtil.isBlank(shopMchEntry.getBank_district()) || StrUtil.isBlank(shopMchEntry.getBank_area())) { Map bankInfo = lklBanksService.GetLklBankByBranchBankNo(shopMchEntry.getOpenning_bank_code()); if (ObjectUtil.isNotEmpty(bankInfo)) { @@ -439,7 +442,7 @@ public class LklTkServiceImpl { put(new JSONObject() { { put("feeCode", "WECHAT"); - put("feeValue", 0.6); + put("feeValue", wxFee); } }); }}); diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopMchEntryServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopMchEntryServiceImpl.java index 8cc91495..c76c2195 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopMchEntryServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopMchEntryServiceImpl.java @@ -166,16 +166,26 @@ public class ShopMchEntryServiceImpl extends BaseServiceImpl