Commit 12789a83 authored by 唐峰's avatar 唐峰

静默异常处理

parent 32bbc944
......@@ -40,6 +40,7 @@ public class BehaviorInterceptor implements HandlerInterceptor {
return true;
}
}
String id = request.getHeader(Constants.X_BEHAVIOR_ID);
if (StringUtils.isEmpty(id)) {
throw new BizException(BizExceptionEnum.UN_EXIT_VERIFY_CODE);
......
......@@ -64,7 +64,7 @@ public class AppletServiceImpl implements IAppletService {
public Long relevance(AppletParamEntry appletParamEntry) {
String appId = wechatConfiguration.getByAppName(appletParamEntry.getAppName()).getAppId();
appId = StringUtils.isEmpty(appletParamEntry.getAppId()) ? appId:appletParamEntry.getAppId();
if (!Objects.equals(appId,appletParamEntry.getAppId())) {
if (!StringUtils.isEmpty(appletParamEntry.getAppId()) && !Objects.equals(appId,appletParamEntry.getAppId())) {
throw new BizException(BizExceptionEnum.ERROR_MATCHING_WECHAT_APP_ID);
}
appletParamEntry.setAppId(appId);
......
......@@ -59,7 +59,7 @@ public class PhonePasswordLoginStrategy implements LoginStrategy {
// 向该phoneNo添加错误计数器
lockIpv4Service.countErrorByPhoneNo(phonePasswordLoginParam.getPhone());
throw new BizException(BizExceptionEnum.UN_EXIT_USER);
throw new SilentBizException(BizExceptionEnum.UN_EXIT_USER);
}
// 优先校验新密码加密方式 如果有并且密码校验不通过
......
......@@ -86,7 +86,7 @@ public class SMSDirectJiLoginStrategy implements LoginStrategy {
boolean register = user == null;
if (user != null && !user.getEnable()) {
log.info("用户不存在,或者已经注销,phoneNo:{}", smsLoginParam.getPhone());
throw new BizException(BizExceptionEnum.ERROR_OR_ENABLE_ERROR);
throw new SilentBizException(BizExceptionEnum.ERROR_OR_ENABLE_ERROR);
} else {
//用户用户为空,则注册一个新用户
if (user == null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment