修改

parent 3fab6d29
......@@ -113,19 +113,19 @@ public class UserController implements IBaseController {
return JsonResult.buildErrorStateResult("登录失败", null);
}
if (user == null) {
user = registerFastWhenLogin(phoneNo, channelId, createdFrom, appChannel,btRegisterChannelId);
user = registerFastWhenLogin(phoneNo, channelId, createdFrom, appChannel,btRegisterChannelId,dimension);
if (user == null) {
throw new UserNotExistException("用户未找到");
}
}
//增加登陆统计发送
UserStatistics statistics=new UserStatistics(user,null,3,channelId);
UserStatistics statistics=new UserStatistics(user,dimension,3,channelId);
MqUtils.sendLoanVest(statistics);
return new JsonResult(sessionService.createSession(channelId, createdFrom, appChannel, user, merchant));
// return createSession(channelId, createdFrom, appChannel, user);
}
private User registerFastWhenLogin(String phoneNo, Long channelId, Long registerFrom, String appChannel, Long btRegisterChannelId) {
private User registerFastWhenLogin(String phoneNo, Long channelId, Long registerFrom, String appChannel, Long btRegisterChannelId,String dimension) {
String password = genRandomPwd();
LOGGER.info("用户快速注册, phoneNo:{}, verificationCode:{}, channelId:{}, registerFrom:{},appChannel:{},btRegisterChannelId", phoneNo, channelId, registerFrom, appChannel,btRegisterChannelId);
if (!ValidationUtil.validatePhoneNo(phoneNo)) {
......@@ -140,7 +140,7 @@ public class UserController implements IBaseController {
}
User user=userService.registerAndReturn(phoneNo, password, registerFrom,btRegisterChannelId);
LOGGER.info("用户快速注册成功, registerFrom:{}, phoneNo:{}", registerFrom, phoneNo);
UserStatistics statistics=new UserStatistics(user,null,2,channelId);
UserStatistics statistics=new UserStatistics(user,dimension,2,channelId);
MqUtils.sendLoanVest(statistics);
return user;
}
......@@ -198,7 +198,7 @@ public class UserController implements IBaseController {
@RequestMapping("/register/fast")
public JsonResult registerFast(@RequestParam String phoneNo, @RequestParam String verificationCode, @RequestParam(required = false) Long channelId,
@RequestParam(required = false) Long registerFrom, @RequestParam(required = false, defaultValue = "") String appChannel,
@RequestParam(required = false)Long btRegisterChannelId) {
@RequestParam(required = false)Long btRegisterChannelId,@RequestParam(required = false)String dimension) {
String password = genRandomPwd();
LOGGER.info("用户快速注册, phoneNo:{}, verificationCode:{}, channelId:{}, registerFrom:{},appChannel:{}", phoneNo, verificationCode, channelId, registerFrom, appChannel);
if (!ValidationUtil.validatePhoneNo(phoneNo)) {
......@@ -224,7 +224,7 @@ public class UserController implements IBaseController {
LOGGER.info("用户快速注册失败,短信验证码错误, registerFrom:{}, phoneNo:{}, verificationCode:{}", registerFrom, phoneNo, verificationCode);
return JsonResult.buildErrorStateResult("短信验证码错误", null);
}
if (!userService.register(phoneNo, password, registerFrom, getIp(), channelId,btRegisterChannelId)) {
if (!userService.register(phoneNo, password, registerFrom, getIp(), channelId,btRegisterChannelId,dimension)) {
LOGGER.info("用户快速注册失败,请稍后重试, registerFrom:{}, phoneNo:{}", registerFrom, phoneNo);
return JsonResult.buildErrorStateResult("注册失败,请稍后重试", null);
}
......@@ -248,7 +248,7 @@ public class UserController implements IBaseController {
public JsonResult register(@RequestParam String phoneNo, @RequestParam String password,
@RequestParam String verificationCode, @RequestParam(required = false) Long channelId,
@RequestParam(required = false) Long registerFrom,
@RequestParam(required = false)Long btRegisterChannelId) {
@RequestParam(required = false)Long btRegisterChannelId,@RequestParam(required = false)String dimension) {
LOGGER.info("用户注册, phoneNo:{}, verificationCode:{}, channelId:{}, registerFrom:{},btRegisterChannelId:{}", phoneNo, verificationCode, channelId, registerFrom,btRegisterChannelId);
if (!ValidationUtil.validatePhoneNo(phoneNo)) {
LOGGER.info("用户注册失败,手机号错误, registerFrom:{}, phoneNo:{}", registerFrom, phoneNo);
......@@ -273,7 +273,7 @@ public class UserController implements IBaseController {
LOGGER.info("用户注册失败,短信验证码错误, registerFrom:{}, phoneNo:{}, verificationCode:{}", registerFrom, phoneNo, verificationCode);
return JsonResult.buildErrorStateResult("短信验证码错误", null);
}
if (!userService.register(phoneNo, password, registerFrom, getIp(), channelId,btRegisterChannelId)) {
if (!userService.register(phoneNo, password, registerFrom, getIp(), channelId,btRegisterChannelId,dimension)) {
LOGGER.info("用户快速注册失败,请稍后重试, registerFrom:{}, phoneNo:{}", registerFrom, phoneNo);
return JsonResult.buildErrorStateResult("注册失败,请稍后重试", null);
}
......
......@@ -32,7 +32,7 @@ public interface IUserService {
User findById(Long userId);
boolean register(String phoneNo, String password, Long registerFrom, String ip, Long channelId, Long btRegisterChannelId);
boolean register(String phoneNo, String password, Long registerFrom, String ip, Long channelId, Long btRegisterChannelId,String dimension);
List<User> findByPhones(List<String> phones);
User registerAndReturn(String phoneNo, String password, Long registerFrom, Long btRegisterChannelId);
......
......@@ -152,7 +152,7 @@ public class UserServiceImpl implements IUserService {
@Override
public boolean register(String phoneNo, String password, Long registerFrom, String ip, Long channelId, Long btRegisterChannelId) {
public boolean register(String phoneNo, String password, Long registerFrom, String ip, Long channelId, Long btRegisterChannelId,String dimension) {
String uuid = lkbUserService.registerApp(phoneNo, password);
Timestamp currentTime = new Timestamp(System.currentTimeMillis());
......@@ -185,7 +185,7 @@ public class UserServiceImpl implements IUserService {
if(registerSuccess){
//增加登陆统计发送
UserStatistics statistics=new UserStatistics(user,null,2,channelId);
UserStatistics statistics=new UserStatistics(user,dimension,2,channelId);
MqUtils.sendLoanVest(statistics);
}
......
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