Commit b3e2d471 authored by 技术部—现金贷—曾丽宾's avatar 技术部—现金贷—曾丽宾

Merge remote-tracking branch 'origin/master' into master-queryLog

# Conflicts:
#	src/main/resources/config/dev/xyqb.properties
parents 14ee8a1d 0f43bf91
...@@ -52,7 +52,6 @@ public class LogCallHttpAspect { ...@@ -52,7 +52,6 @@ public class LogCallHttpAspect {
return result; return result;
} }
@Async
public void asyncRecordIt(ProceedingJoinPoint pjp, Object result, String remoteIP){ public void asyncRecordIt(ProceedingJoinPoint pjp, Object result, String remoteIP){
Object[] args = pjp.getArgs(); Object[] args = pjp.getArgs();
String methodName = pjp.getSignature().getName(); String methodName = pjp.getSignature().getName();
......
...@@ -296,7 +296,7 @@ public class MotanUserServiceImpl implements UserMotanService { ...@@ -296,7 +296,7 @@ public class MotanUserServiceImpl implements UserMotanService {
SessionStruct sessionStruct = sessionService.createSessionAndPersist(user, loginProperties); SessionStruct sessionStruct = sessionService.createSessionAndPersist(user, loginProperties);
LoginInfo loginInfo = new LoginInfo(); LoginInfo loginInfo = new LoginInfo();
loginInfo.setUser(UserRet.getUserRet(user)); loginInfo.setUser(new UserRet(user));
loginInfo.setToken(sessionStruct.getSid()); loginInfo.setToken(sessionStruct.getSid());
LoginInfo.LoginContext context = new LoginInfo.LoginContext(); LoginInfo.LoginContext context = new LoginInfo.LoginContext();
context.setChannelId(sessionStruct.getValues().getLoginProperties().getChannelId()); context.setChannelId(sessionStruct.getValues().getLoginProperties().getChannelId());
......
...@@ -148,7 +148,7 @@ public class AppController implements IBaseController { ...@@ -148,7 +148,7 @@ public class AppController implements IBaseController {
SessionStruct sessionStruct = sessionService.createSessionAndPersist(user, loginProperties); SessionStruct sessionStruct = sessionService.createSessionAndPersist(user, loginProperties);
LoginInfo loginInfo = new LoginInfo(); LoginInfo loginInfo = new LoginInfo();
loginInfo.setUser(UserRet.getUserRet(user)); loginInfo.setUser(new UserRet(user));
loginInfo.setToken(sessionStruct.getSid()); loginInfo.setToken(sessionStruct.getSid());
LoginInfo.LoginContext context = new LoginInfo.LoginContext(); LoginInfo.LoginContext context = new LoginInfo.LoginContext();
context.setChannelId(sessionStruct.getValues().getLoginProperties().getChannelId()); context.setChannelId(sessionStruct.getValues().getLoginProperties().getChannelId());
......
...@@ -54,7 +54,7 @@ public class AuthInfoController implements IBaseController { ...@@ -54,7 +54,7 @@ public class AuthInfoController implements IBaseController {
if(null != sessionStruct) { if(null != sessionStruct) {
log.info("从用户中心获取到了用户登录信息:phone:[{}]", sessionStruct.getValues().getUser().getPhoneNo()); log.info("从用户中心获取到了用户登录信息:phone:[{}]", sessionStruct.getValues().getUser().getPhoneNo());
LoginInfo loginInfo = new LoginInfo(); LoginInfo loginInfo = new LoginInfo();
loginInfo.setUser(UserRet.getUserRet(sessionStruct.getValues().getUser())); loginInfo.setUser(new UserRet(sessionStruct.getValues().getUser()));
loginInfo.setToken(sessionStruct.getSid()); loginInfo.setToken(sessionStruct.getSid());
LoginInfo.LoginContext context = new LoginInfo.LoginContext(); LoginInfo.LoginContext context = new LoginInfo.LoginContext();
context.setChannelId(sessionStruct.getValues().getLoginProperties().getChannelId()); context.setChannelId(sessionStruct.getValues().getLoginProperties().getChannelId());
...@@ -82,7 +82,7 @@ public class AuthInfoController implements IBaseController { ...@@ -82,7 +82,7 @@ public class AuthInfoController implements IBaseController {
String phoneNo = ((Map<String, String>) result.getData()).get("phoneNo"); String phoneNo = ((Map<String, String>) result.getData()).get("phoneNo");
User user = userService.findByPhoneWithCache(phoneNo); User user = userService.findByPhoneWithCache(phoneNo);
LoginInfo loginInfo = new LoginInfo(); LoginInfo loginInfo = new LoginInfo();
loginInfo.setUser(UserRet.getUserRet(user)); loginInfo.setUser(new UserRet(user));
loginInfo.setToken(token); loginInfo.setToken(token);
LoginInfo.LoginContext context = new LoginInfo.LoginContext(); LoginInfo.LoginContext context = new LoginInfo.LoginContext();
context.setChannelId(null); context.setChannelId(null);
......
...@@ -95,7 +95,7 @@ public class UserController implements IBaseController { ...@@ -95,7 +95,7 @@ public class UserController implements IBaseController {
public JsonResult loginFast( public JsonResult loginFast(
@RequestParam(required = false, defaultValue = "1") Long channelId, String appChannel, @RequestParam(required = false, defaultValue = "1") Long channelId, String appChannel,
@RequestParam(required = false, defaultValue = "1") Long createdFrom, String key,@RequestParam(required = false)Long btRegisterChannelId ,HttpServletRequest request) { @RequestParam(required = false, defaultValue = "1") Long createdFrom, String key,@RequestParam(required = false)Long btRegisterChannelId ,HttpServletRequest request) {
Map<String, JsonResult> validMap = getHeaderParam(request); Map<String, JsonResult> validMap = getHeaderParam(request);
if (null != validMap.get("fail")) { if (null != validMap.get("fail")) {
return validMap.get("fail"); return validMap.get("fail");
} }
...@@ -129,6 +129,9 @@ public class UserController implements IBaseController { ...@@ -129,6 +129,9 @@ public class UserController implements IBaseController {
if (null == registerFrom) { if (null == registerFrom) {
registerFrom = 1L; registerFrom = 1L;
} }
if (channelId == 222L) {
registerFrom=222L;
}
LOGGER.info("用户快速注册成功, registerFrom:{}, phoneNo:{}", registerFrom, phoneNo); LOGGER.info("用户快速注册成功, registerFrom:{}, phoneNo:{}", registerFrom, phoneNo);
return userService.registerAndReturn(phoneNo, password, registerFrom,btRegisterChannelId); return userService.registerAndReturn(phoneNo, password, registerFrom,btRegisterChannelId);
......
...@@ -35,18 +35,17 @@ public class UserRet implements Serializable { ...@@ -35,18 +35,17 @@ public class UserRet implements Serializable {
//上一次修改时间 //上一次修改时间
private Long updatedAt; private Long updatedAt;
public static UserRet getUserRet(User user) { public UserRet(User user) {
Long createTimeStamp = user.getCreatedAt().getTime(); Long createTimeStamp = user.getCreatedAt().getTime();
Long updateTimeStamp = user.getUpdatedAt().getTime(); Long updateTimeStamp = user.getUpdatedAt().getTime();
UserRet userRet = new UserRet(); this.setId(user.getId());
userRet.setId(user.getId()); this.setPhoneNo(user.getPhoneNo());
userRet.setPhoneNo(user.getPhoneNo()); this.setEnable(user.getEnable());
userRet.setEnable(user.getEnable()); this.setPassword(StringUtils.defaultIfEmpty(user.getPassword(), ""));
userRet.setPassword(StringUtils.defaultIfEmpty(user.getPassword(), "")); this.setRegisteredFrom(user.getRegisteredFrom());
userRet.setRegisteredFrom(user.getRegisteredFrom()); this.setUuid(user.getUuid());
userRet.setUuid(user.getUuid()); this.setCreatedAt(createTimeStamp);
userRet.setCreatedAt(createTimeStamp); this.setUpdatedAt(updateTimeStamp);
userRet.setUpdatedAt(updateTimeStamp);
return userRet;
} }
} }
...@@ -81,6 +81,7 @@ public class UserServiceImpl implements IUserService { ...@@ -81,6 +81,7 @@ public class UserServiceImpl implements IUserService {
private final static Random random = new Random(); private final static Random random = new Random();
@Override @Override
@Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager")
public User findByPhoneInDb(String phone) { public User findByPhoneInDb(String phone) {
return userRepository.findByPhoneNo(phone); return userRepository.findByPhoneNo(phone);
} }
......
...@@ -3,7 +3,7 @@ configserver.disable=1 ...@@ -3,7 +3,7 @@ configserver.disable=1
configserver.system=xyqb-user configserver.system=xyqb-user
#xyqb.data.mysql.jdbc-url=jdbc:mysql://192.168.4.22:3306/xyqb_user?useUnicode=true&characterEncoding=UTF8 #xyqb.data.mysql.jdbc-url=jdbc:mysql://192.168.4.22:3306/xyqb_user?useUnicode=true&characterEncoding=UTF8
xyqb.data.mysql.jdbc-url=jdbc:mysql://192.168.4.26:3306/xyqb_user?useUnicode=true&characterEncoding=UTF8 xyqb.data.mysql.jdbc-url=jdbc:mysql://192.168.4.23:3306/xyqb_user?useUnicode=true&characterEncoding=UTF8
xyqb.data.mysql.password=qatest xyqb.data.mysql.password=qatest
...@@ -71,6 +71,7 @@ xyqb.auth.url=http://192.168.192.206:9001 ...@@ -71,6 +71,7 @@ xyqb.auth.url=http://192.168.192.206:9001
usersys.url=http://localhost:9001 usersys.url=http://localhost:9001
xyqb-user.ui=http://192.168.100.36:7043 xyqb-user.ui=http://192.168.100.36:7043
xyqb-user.ui-s=https://192.168.100.36:7043
wechat.appid=wxcdf6077af8127559 wechat.appid=wxcdf6077af8127559
wechat.secret=16eaec16084d0d9c52d4114f359cc72c wechat.secret=16eaec16084d0d9c52d4114f359cc72c
...@@ -89,10 +90,4 @@ motan.application=xyqbUserMotan ...@@ -89,10 +90,4 @@ motan.application=xyqbUserMotan
#xyqb-user-域名 #xyqb-user-域名
xyqb.user.domain=passport.xyqb.com xyqb.user.domain=passport.xyqb.com
xyqb.user.query.url=http://192.168.11.40:8081 xyqb.user.query.url=http://192.168.11.40:8081
xyqb.domain = http://192.168.4.153:7003 xyqb.domain = http://192.168.4.153:7003
\ No newline at end of file
xyqb.paycenter.url=http://192.168.4.26:7006
xyqb.paycenter.id=3
#运营系统认证地址
xyqb.yunying.url=http://192.168.4.50:7047
\ No newline at end of file
...@@ -36,6 +36,7 @@ jr58.notify.userinfo=http://dk.58.com/customer/quantgroup_user_info ...@@ -36,6 +36,7 @@ jr58.notify.userinfo=http://dk.58.com/customer/quantgroup_user_info
model.quantgroup.url=http://model.quantgroup.cn model.quantgroup.url=http://model.quantgroup.cn
xyqb.auth.url=http://auth.xyqb.com xyqb.auth.url=http://auth.xyqb.com
xyqb-user.ui=http://passport.xyqb.com xyqb-user.ui=http://passport.xyqb.com
xyqb-user.ui-s=https://passport.xyqb.com
#motan protocol #motan protocol
protocol.name=motan protocol.name=motan
protocol.contentLength=1048576 protocol.contentLength=1048576
......
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