Commit b1ae4b10 by “Kongxiangkun”

评论,收藏,点赞 埋点修改

parent cfea478f
...@@ -116,9 +116,9 @@ public class StudyCaseController { ...@@ -116,9 +116,9 @@ public class StudyCaseController {
idOneVO.setContext(context); idOneVO.setContext(context);
InformationViewVO viewVO = informationStudentFeignClients.getInformation(idOneVO); InformationViewVO viewVO = informationStudentFeignClients.getInformation(idOneVO);
// 添加点赞埋点 // 添加点赞埋点
if(request.getHeader("Cookie")!=null&& Objects.equals(redisCache.get(request.getHeader("Cookie").replace("JSESSIONID=","")),"2")){ //if(request.getHeader("Cookie")!=null&& Objects.equals(redisCache.get(request.getHeader("Cookie").replace("JSESSIONID=","")),"2")){
eventTrackApiClients.addEvent("event_favorite_"+viewVO.getTypeOne(),studentCaseId); eventTrackApiClients.addEvent("event_favorite_"+viewVO.getTypeOne(),studentCaseId);
} // }
return Response.ok(); return Response.ok();
} else { } else {
LOGGER.error("############学习案例收藏过程中出现错误"); LOGGER.error("############学习案例收藏过程中出现错误");
......
...@@ -67,9 +67,9 @@ public class EnrollApiController { ...@@ -67,9 +67,9 @@ public class EnrollApiController {
pointListenerClients.addPoint("CreditClendarDone", id); pointListenerClients.addPoint("CreditClendarDone", id);
// 添加学院报名埋点 // 添加学院报名埋点
if(request.getHeader("Cookie")!=null&& Objects.equals(redisCache.get(request.getHeader("Cookie").replace("JSESSIONID=","")),"2")){ //if(request.getHeader("Cookie")!=null&& Objects.equals(redisCache.get(request.getHeader("Cookie").replace("JSESSIONID=","")),"2")){
eventTrackApiClients.addEvent("event_enroll_student",vo.getId()); eventTrackApiClients.addEvent("event_enroll_student",vo.getId());
} //}
return Response.ok(id); return Response.ok(id);
} catch (Exception e) { } catch (Exception e) {
LOG.error("添加学员报名信息:" + e); LOG.error("添加学员报名信息:" + e);
......
...@@ -81,9 +81,9 @@ public class TpCommentApiController { ...@@ -81,9 +81,9 @@ public class TpCommentApiController {
RequestContext context = ContextHolder.get(); RequestContext context = ContextHolder.get();
// 添加发表评论埋点 // 添加发表评论埋点
if(request.getHeader("Cookie")!=null&&Objects.equals(redisCache.get(request.getHeader("Cookie").replace("JSESSIONID=","")),"2")){ //if(request.getHeader("Cookie")!=null&&Objects.equals(redisCache.get(request.getHeader("Cookie").replace("JSESSIONID=","")),"2")){
eventTrackApiClients.addEvent("event_tp_comment",tpComment.getTrainingProjectId()); eventTrackApiClients.addEvent("event_tp_comment",tpComment.getTrainingProjectId());
} //}
if (f) { if (f) {
LOGGER.info("发表评论成功"); LOGGER.info("发表评论成功");
return Response.ok("发表评论成功"); return Response.ok("发表评论成功");
......
...@@ -74,9 +74,9 @@ public class TpCommentReplyApiController { ...@@ -74,9 +74,9 @@ public class TpCommentReplyApiController {
tpCommentReply.setUserAvatar(requestContext.getHeadPortrait()); tpCommentReply.setUserAvatar(requestContext.getHeadPortrait());
Boolean f = tpCommentReplyClient.save(tpCommentReply); Boolean f = tpCommentReplyClient.save(tpCommentReply);
// 添加发表评论埋点 // 添加发表评论埋点
if(request.getHeader("Cookie")!=null&&Objects.equals(redisCache.get(request.getHeader("Cookie").replace("JSESSIONID=","")),"2")){ //if(request.getHeader("Cookie")!=null&&Objects.equals(redisCache.get(request.getHeader("Cookie").replace("JSESSIONID=","")),"2")){
eventTrackApiClients.addEvent("event_tp_comment",tpCommentReply.getTrainingProjectId()); eventTrackApiClients.addEvent("event_tp_comment",tpCommentReply.getTrainingProjectId());
} //}
if (f) { if (f) {
LOGGER.info("回复评论成功"); LOGGER.info("回复评论成功");
return Response.ok("回复评论成功"); return Response.ok("回复评论成功");
......
...@@ -2,6 +2,7 @@ package com.yizhi.application.project.controller; ...@@ -2,6 +2,7 @@ package com.yizhi.application.project.controller;
import com.yizhi.core.application.context.ContextHolder; import com.yizhi.core.application.context.ContextHolder;
import com.yizhi.core.application.context.RequestContext; import com.yizhi.core.application.context.RequestContext;
import com.yizhi.site.application.feign.api.EventTrackApiClients;
import com.yizhi.training.application.feign.TpCommentThumbsUpClient; import com.yizhi.training.application.feign.TpCommentThumbsUpClient;
import com.yizhi.training.application.vo.domain.TpCommentThumbsUpVo; import com.yizhi.training.application.vo.domain.TpCommentThumbsUpVo;
import com.yizhi.util.application.domain.Response; import com.yizhi.util.application.domain.Response;
...@@ -29,6 +30,8 @@ public class TpCommentThumbsUpApiController { ...@@ -29,6 +30,8 @@ public class TpCommentThumbsUpApiController {
@Autowired @Autowired
TpCommentThumbsUpClient tpCommentThumbsUpClient; TpCommentThumbsUpClient tpCommentThumbsUpClient;
@Autowired
private EventTrackApiClients eventTrackApiClients;
private static final Logger LOGGER = LoggerFactory.getLogger(TpCommentThumbsUpApiController.class); private static final Logger LOGGER = LoggerFactory.getLogger(TpCommentThumbsUpApiController.class);
...@@ -44,6 +47,9 @@ public class TpCommentThumbsUpApiController { ...@@ -44,6 +47,9 @@ public class TpCommentThumbsUpApiController {
Boolean f = tpCommentThumbsUpClient.save(tpCommentThumbsUp); Boolean f = tpCommentThumbsUpClient.save(tpCommentThumbsUp);
if (f) { if (f) {
LOGGER.info("点赞成功"); LOGGER.info("点赞成功");
// if(request.getHeader("Cookie")!=null&&Objects.equals(redisCache.get(request.getHeader("Cookie").replace("JSESSIONID=","")),"2")){
eventTrackApiClients.addEvent("event_comment_thumbs",requestContext.getAccountId());
// }
return Response.ok("点赞成功"); return Response.ok("点赞成功");
} else { } else {
LOGGER.error("点赞失败"); LOGGER.error("点赞失败");
......
...@@ -177,9 +177,9 @@ public class SignApiController { ...@@ -177,9 +177,9 @@ public class SignApiController {
signMap.put("name", result); signMap.put("name", result);
} else if (result.equals("签到成功")) { } else if (result.equals("签到成功")) {
// 添加活动签到埋点 // 添加活动签到埋点
if(request.getHeader("Cookie")!=null&&Objects.equals(redisCache.get(request.getHeader("Cookie").replace("JSESSIONID=","")),"2")){ // if(request.getHeader("Cookie")!=null&&Objects.equals(redisCache.get(request.getHeader("Cookie").replace("JSESSIONID=","")),"2")){
eventTrackApiClients.addEvent("event_activity_sign",accountId); eventTrackApiClients.addEvent("event_activity_sign",accountId);
} // }
signMap.put("code", "2"); signMap.put("code", "2");
signMap.put("name", result); signMap.put("name", result);
} else if (result.equals("您已签到成功")) { } else if (result.equals("您已签到成功")) {
......
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