admin
2022-01-28 cd7767932dddeaf6d9c73a83d4a9b38f0341b77f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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("");
    }
 
 
}