xiangpei
2025-05-27 65db839dc04c558706325ad36c1359a6093f7d66
视频播放记录保存
5个文件已修改
12 ■■■■ 已修改文件
buyer-api/src/main/java/cn/lili/controller/lmk/VideoController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsSkuServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/domain/form/VideoFootPrintForm.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/member/entity/dos/FootPrint.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
buyer-api/src/main/java/cn/lili/controller/lmk/VideoController.java
@@ -74,7 +74,7 @@
    @PostMapping("/view/record")
    @ApiOperation(value = "保存观看记录", notes = "保存观看记录")
    public Result saveViewRecord(VideoFootPrintForm form) {
    public Result saveViewRecord(@RequestBody VideoFootPrintForm form) {
        return videoService.saveViewRecord(form);
    }
}
framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsSkuServiceImpl.java
@@ -366,7 +366,7 @@
        //记录用户足迹
        if (currentUser != null) {
            FootPrint footPrint = new FootPrint(currentUser.getId(), goodsIndex.getStoreId(), goodsId, skuId, ViewTypeEnum.GOODS.getValue(), null);
            FootPrint footPrint = new FootPrint(currentUser.getId(), goodsIndex.getStoreId(), goodsId, skuId, ViewTypeEnum.GOODS.getValue(), null, null);
            String destination = rocketmqCustomProperties.getGoodsTopic() + ":" + GoodsTagsEnum.VIEW_GOODS.name();
            rocketMQTemplate.asyncSend(destination, footPrint, RocketmqSendCallbackBuilder.commonCallback());
        }
framework/src/main/java/cn/lili/modules/lmk/domain/form/VideoFootPrintForm.java
@@ -19,4 +19,7 @@
    @ApiModelProperty("观看时长")
    private Long viewDuration;
    @ApiModelProperty("视频播放至")
    private String playAt;
}
framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java
@@ -298,6 +298,7 @@
        footPrint.setRefId(form.getVideoId());
        footPrint.setMemberId(UserContext.getCurrentUserId());
        footPrint.setViewDuration(form.getViewDuration());
        footPrint.setPlayAt(form.getPlayAt());
        footprintService.saveFootprint(footPrint);
        return Result.ok();
    }
framework/src/main/java/cn/lili/modules/member/entity/dos/FootPrint.java
@@ -42,7 +42,9 @@
    @ApiModelProperty(value = "浏览类型:goods商品、view视频")
    private String viewType;
    @ApiModelProperty(value = "观看时长:秒")
    @ApiModelProperty(value = "观看时长:毫秒")
    private Long viewDuration;
    @ApiModelProperty(value = "播放至:毫秒")
    private String playAt;
}