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

add:神策登录埋点

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