Commit c707ec81 authored by 张宏至's avatar 张宏至

add:神策登录埋点

parent 2baca299
...@@ -168,8 +168,6 @@ public class AppController implements IBaseController { ...@@ -168,8 +168,6 @@ public class AppController implements IBaseController {
log.info("第三方用户获取信息登录成功 [AppController] loginSuper --> loginFrom:{}, phoneNo:{},appChannel:{},channelId:{}", registerFrom, phoneNo, appChannel, channelId); log.info("第三方用户获取信息登录成功 [AppController] loginSuper --> loginFrom:{}, phoneNo:{},appChannel:{},channelId:{}", registerFrom, phoneNo, appChannel, channelId);
try{ try{
if(!StringUtils.isEmpty(merchant.getId()+"")){
if("7".equals(merchant.getId()+"")){
EventRecord userRecord = EventRecord.builder().setDistinctId(user.getUuid()).isLoginId(Boolean.TRUE) EventRecord userRecord = EventRecord.builder().setDistinctId(user.getUuid()).isLoginId(Boolean.TRUE)
.setEventName("PD_WUXIEC_UserLogin") .setEventName("PD_WUXIEC_UserLogin")
.addProperty("son_channel_id", user.getRegisteredFrom()) .addProperty("son_channel_id", user.getRegisteredFrom())
...@@ -178,8 +176,6 @@ public class AppController implements IBaseController { ...@@ -178,8 +176,6 @@ public class AppController implements IBaseController {
.build(); .build();
iSensorsAnalytics.track(userRecord); iSensorsAnalytics.track(userRecord);
iSensorsAnalytics.flush(); iSensorsAnalytics.flush();
}
}
}catch (Exception e){ }catch (Exception e){
log.info("神策埋点出现问题",e); log.info("神策埋点出现问题",e);
} }
......
...@@ -331,6 +331,7 @@ public class UserServiceImpl implements IUserService, IBaseController { ...@@ -331,6 +331,7 @@ public class UserServiceImpl implements IUserService, IBaseController {
@Autowired @Autowired
private ISensorsAnalytics iSensorsAnalytics; private ISensorsAnalytics iSensorsAnalytics;
@Override @Override
@RedisLock(prefix = "lock:login:fast:", key = "#this[8]") @RedisLock(prefix = "lock:login:fast:", key = "#this[8]")
public JsonResult loginFast(Long channelId, String appChannel, Long createdFrom, Long btRegisterChannelId, public JsonResult loginFast(Long channelId, String appChannel, Long createdFrom, Long btRegisterChannelId,
...@@ -354,21 +355,17 @@ public class UserServiceImpl implements IUserService, IBaseController { ...@@ -354,21 +355,17 @@ public class UserServiceImpl implements IUserService, IBaseController {
if (!wechatRelateUserIfNecessary(user, request)) { if (!wechatRelateUserIfNecessary(user, request)) {
return JsonResult.buildErrorStateResult("登录时微信关联失败", null); return JsonResult.buildErrorStateResult("登录时微信关联失败", null);
} }
try{ try {
if(!StringUtils.isEmpty(merchant.getId()+"")){ EventRecord userRecord = EventRecord.builder().setDistinctId(user.getUuid()).isLoginId(Boolean.TRUE)
if("7".equals(merchant.getId()+"")){ .setEventName("PD_WUXIEC_UserLogin")
EventRecord userRecord = EventRecord.builder().setDistinctId(user.getUuid()).isLoginId(Boolean.TRUE) .addProperty("son_channel_id", user.getRegisteredFrom())
.setEventName("PD_WUXIEC_UserLogin") .addProperty("parent_channel_id", "")
.addProperty("son_channel_id", user.getRegisteredFrom()) .addProperty("vcc_uuid", user.getUuid())
.addProperty("parent_channel_id", "") .build();
.addProperty("vcc_uuid", user.getUuid()) iSensorsAnalytics.track(userRecord);
.build(); iSensorsAnalytics.flush();
iSensorsAnalytics.track(userRecord); } catch (Exception e) {
iSensorsAnalytics.flush(); log.info("神策埋点出现问题", e);
}
}
}catch (Exception e){
log.info("神策埋点出现问题",e);
} }
LoginProperties loginProperties = new LoginProperties("", 3, channelId, createdFrom, appChannel, merchant.getId(), merchant.getName()); LoginProperties loginProperties = new LoginProperties("", 3, channelId, createdFrom, appChannel, merchant.getId(), merchant.getName());
AuthBean session = sessionService.createSession(user, loginProperties); AuthBean session = sessionService.createSession(user, loginProperties);
......
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