Commit 81128103 authored by 于桐's avatar 于桐

日志降级

parent 55339a3a
......@@ -71,7 +71,8 @@ public class PhoneHashEventListener implements ApplicationListener<RegisterEvent
try {
userHashMappingRepository.saveAndFlush(userHashMapping);
} catch (PersistenceException e) {
log.error("保存userHashMapping重复, 无需再保存, userId:{}", userId);
// 可能与UserDetailUpdateEvent并发写入问题,暂不优化
log.warn("保存userHashMapping重复, 无需再保存, userId:{}", userId);
}
}
......
......@@ -49,7 +49,8 @@ public class UserDetailHashEventListener implements ApplicationListener<UserDeta
try {
userHashMappingRepository.save(userHashMapping);
} catch (PersistenceException e) {
log.error("保存userHashMapping重复, 无需再保存, userId:{}", userDetail.getUserId());
// 可能与RegisterEvent并发写入问题,暂不优化
log.warn("保存userHashMapping重复, 无需再保存, userId:{}", userDetail.getUserId());
}
UserHashPhoneNoIdNoMapping userHashPhoneNoIdNoMapping = userHashPhoneNoIdNoMappingRepository.findByUserId(userDetail.getUserId());
......
......@@ -6,7 +6,6 @@ import cn.quantgroup.xyqb.entity.middleoffice.AppletParamEntry;
import cn.quantgroup.xyqb.entity.User;
import cn.quantgroup.xyqb.entity.WechatUserInfo;
import cn.quantgroup.xyqb.exception.AppletException;
import cn.quantgroup.xyqb.exception.DataException;
import cn.quantgroup.xyqb.repository.IWeChatUserRepository;
import cn.quantgroup.xyqb.service.middleoffice.applet.IAppletService;
import cn.quantgroup.xyqb.service.register.IUserRegisterService;
......@@ -84,17 +83,17 @@ public class AppletServiceImpl implements IAppletService {
public LoginVo login(String appName, String openId, String utmSource) {
WechatUserInfo wechatUserInfo = iWeChatUserRepository.findByOpenIdAndAppName(openId, appName);
if (null == wechatUserInfo) {
log.error("未找到此用户,appName:{} ,openId:{}", appName, openId);
log.warn("未找到此用户,appName:{} ,openId:{}", appName, openId);
throw new AppletException("未找到此用户","0401");
}
if (null == wechatUserInfo.getUserId()) {
log.error("用户未绑定到xyqb,appName:{} ,openId:{}", appName, openId);
log.warn("用户未绑定到xyqb,appName:{} ,openId:{}", appName, openId);
throw new AppletException("未找到此用户绑定信息","0401");
}
User user = userService.findById(wechatUserInfo.getUserId());
if (null == user) {
log.error("未找到此用户,appName:{} ,openId:{}", appName, openId);
log.warn("未找到此用户,appName:{} ,openId:{}", appName, openId);
throw new AppletException("未找到此用户","0401");
}
LoginVo loginVo = loginModule.loginByUserId(user.getRegisteredFrom(),
......
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