diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java index d9e8e848d..59996bd39 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/handler/GlobalExceptionHandler.java @@ -137,6 +137,13 @@ public class GlobalExceptionHandler { assert fieldError != null; // 断言,避免告警 return CommonResult.error(BAD_REQUEST.getCode(), String.format("请求参数不正确:%s", fieldError.getDefaultMessage())); } + @ExceptionHandler(IllegalArgumentException.class) + public CommonResult IllegalArgumentExceptionHandler(BindException ex) { + log.warn("[IllegalArgumentException]", ex); + FieldError fieldError = ex.getFieldError(); + assert fieldError != null; // 断言,避免告警 + return CommonResult.error(INTERNAL_SERVER_ERROR.getCode(), fieldError.getDefaultMessage()); + } /** * 处理 Validator 校验不通过产生的异常 diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/api/user/MemberUserApiImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/api/user/MemberUserApiImpl.java index 4079e1408..c165524dd 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/api/user/MemberUserApiImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/api/user/MemberUserApiImpl.java @@ -112,8 +112,11 @@ public class MemberUserApiImpl implements MemberUserApi { public PromoterDTO getPromoterDOByUserId(Long userId) { PromoterDTO promoterDTO = new PromoterDTO(); PromoterDO promoterDO = promoterService.getPromoterDOByUserId(userId); - promoterDTO.setDeptId(promoterDO.getDeptId()); - promoterDO.setId(promoterDO.getId()); + if(promoterDO != null){ + promoterDTO.setDeptId(promoterDO.getDeptId()); + promoterDO.setId(promoterDO.getId()); + return promoterDTO; + } return promoterDTO; } diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 3bff69743..cbed8c6d9 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -220,11 +220,11 @@ yudao: - eb_express - eb_store_order_status sms-code: # 短信验证码相关的配置项 - expire-times: 10m - send-frequency: 1m + expire-times: 5m + send-frequency: 10m send-maximum-quantity-per-day: 10 - begin-code: 9999 # 这里配置 9999 的原因是,测试方便。 - end-code: 9999 # 这里配置 9999 的原因是,测试方便。 + begin-code: 100000 # 这里配置 9999 的原因是,测试方便。 + end-code: 999999 # 这里配置 9999 的原因是,测试方便。 trade: order: app-id: 1 # 商户编号