package com.yeshi.buwan.controller.api;
|
|
import com.yeshi.buwan.service.inter.user.UserDPContentWatchStatisticService;
|
import com.yeshi.buwan.util.JsonUtilV2;
|
import com.yeshi.buwan.util.RedisManager;
|
import com.yeshi.buwan.util.StringUtil;
|
import com.yeshi.buwan.vo.AcceptData;
|
import org.apache.zookeeper.Login;
|
import org.slf4j.Logger;
|
import org.slf4j.LoggerFactory;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.yeshi.utils.annotation.RequestSerializableByKey;
|
|
import javax.annotation.Resource;
|
|
|
/**
|
* @author hxh
|
* @description 客户端事件收集
|
* @date 15:36 2021/12/28
|
* @return
|
**/
|
@Controller
|
@RequestMapping("api/v2/event")
|
public class ClientEventController {
|
|
Logger logger = LoggerFactory.getLogger(ClientEventController.class);
|
|
@Resource
|
private UserDPContentWatchStatisticService userDPContentWatchStatisticService;
|
|
|
///阅读新闻
|
@RequestMapping("readNews")
|
@ResponseBody
|
public String readNews(AcceptData acceptData, String LoginUid) {
|
logger.info("readNews:{},{},{}", acceptData.getDetailSystem().getId(), userDPContentWatchStatisticService.getIdentityId(acceptData), LoginUid);
|
userDPContentWatchStatisticService.readNews(acceptData, LoginUid);
|
return JsonUtilV2.loadTrueJson("");
|
}
|
|
///沉浸式视频播放
|
@RequestSerializableByKey(key = "#acceptData.Package+'-'+#acceptData.device+'-'+#acceptData.utdId")
|
@RequestMapping("playDrawVideo")
|
@ResponseBody
|
public String playDrawVideo(AcceptData acceptData, String Source, String From, boolean Finish, String LoginUid) {
|
logger.info("playDrawVideo:{},{},{},{},{},{}", acceptData.getDetailSystem().getId(), userDPContentWatchStatisticService.getIdentityId(acceptData), Source, From, Finish, LoginUid);
|
userDPContentWatchStatisticService.playDrawVideo(acceptData, LoginUid);
|
return JsonUtilV2.loadTrueJson("");
|
}
|
|
///小说阅读
|
@RequestMapping("readNovel")
|
@ResponseBody
|
public String readNovel(AcceptData acceptData, long Duration, String LoginUid) {
|
logger.info("readNovel:{},{},{},{}", acceptData.getDetailSystem().getId(), userDPContentWatchStatisticService.getIdentityId(acceptData), Duration, LoginUid);
|
userDPContentWatchStatisticService.readNovel(acceptData, Duration, LoginUid);
|
return JsonUtilV2.loadTrueJson("");
|
}
|
|
|
}
|