Commit f535aadd authored by 技术部-任文超's avatar 技术部-任文超

Fixe注册统计消息重复的bug

parent c57a4298
...@@ -185,11 +185,12 @@ public class InnerController implements IBaseController { ...@@ -185,11 +185,12 @@ public class InnerController implements IBaseController {
} }
} }
@LogHttpCaller
@RequestMapping("/user/save") @RequestMapping("/user/save")
public JsonResult saveUser( public JsonResult saveUser(
String phoneNo, Long registeredFrom, Long createdAt, Long updatedAt, String phoneNo, Long registeredFrom, Long createdAt, Long updatedAt,
String password, String uuid) { String password, String uuid) {
LOGGER.info("保存用户,phoneNo:{},registeredFrom;{},uuid:{}", phoneNo, registeredFrom, uuid); LOGGER.info("保存用户,phoneNo:{},registeredFrom;{},uuid:{},createdAt:{},updatedAt:{}", phoneNo, registeredFrom, uuid,createdAt,updatedAt);
//参数验证 //参数验证
if (StringUtils.isBlank(phoneNo)) { if (StringUtils.isBlank(phoneNo)) {
return JsonResult.buildErrorStateResult("用户手机号不能为空.", null); return JsonResult.buildErrorStateResult("用户手机号不能为空.", null);
......
...@@ -198,20 +198,17 @@ public class UserController implements IBaseController { ...@@ -198,20 +198,17 @@ public class UserController implements IBaseController {
LOGGER.error("用户不存在,或者已经注销,phoneNo:{}",phoneNo); LOGGER.error("用户不存在,或者已经注销,phoneNo:{}",phoneNo);
return JsonResult.buildErrorStateResult("登录失败", null); return JsonResult.buildErrorStateResult("登录失败", null);
} }
UserStatistics statistics = null;
JSONObject qqGdt = null;
if (user == null) { if (user == null) {
// Service层会负责发送注册消息到LoanVest
user = userRegisterService.register(phoneNo, channelId, createdFrom, appChannel,btRegisterChannelId,dimension); user = userRegisterService.register(phoneNo, channelId, createdFrom, appChannel,btRegisterChannelId,dimension);
if (user == null) { if (user == null) {
throw new UserNotExistException("用户未找到"); throw new UserNotExistException("用户未找到");
} }
//广点通转化注册 - 发送消息 - 方法内过滤 //广点通转化注册 - 发送消息 - 方法内过滤
MqUtils.sendRegisterMessageForGdt(phoneNo, clickId); MqUtils.sendRegisterMessageForGdt(phoneNo, clickId);
statistics = new UserStatistics(user,dimension,2,channelId);
}else{
statistics = new UserStatistics(user,dimension,3,channelId);
} }
//增加登陆统计发送 //增加登陆统计发送
UserStatistics statistics = new UserStatistics(user,dimension,3,channelId);
MqUtils.sendLoanVest(statistics); MqUtils.sendLoanVest(statistics);
return new JsonResult(sessionService.createSession(channelId, createdFrom, appChannel, user, merchant)); return new JsonResult(sessionService.createSession(channelId, createdFrom, appChannel, user, merchant));
// return createSession(channelId, createdFrom, appChannel, user); // return createSession(channelId, createdFrom, appChannel, user);
......
...@@ -33,7 +33,7 @@ public class MqUtils { ...@@ -33,7 +33,7 @@ public class MqUtils {
* 用户注册消息进行广播 * 用户注册消息进行广播
* @param message * @param message
*/ */
public static void sendRegisterMessage(UserRegisterMqMessage message){ private static void sendRegisterMessage(UserRegisterMqMessage message){
try { try {
IRegisterMqService rService = ApplicationContextHolder.getBean("registerMqService"); IRegisterMqService rService = ApplicationContextHolder.getBean("registerMqService");
rService.send(message); rService.send(message);
......
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