From 65db839dc04c558706325ad36c1359a6093f7d66 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期二, 27 五月 2025 10:50:17 +0800
Subject: [PATCH] 视频播放记录保存

---
 framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsSkuServiceImpl.java |    2 +-
 buyer-api/src/main/java/cn/lili/controller/lmk/VideoController.java                |    2 +-
 framework/src/main/java/cn/lili/modules/lmk/domain/form/VideoFootPrintForm.java    |    3 +++
 framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java     |    1 +
 framework/src/main/java/cn/lili/modules/member/entity/dos/FootPrint.java           |    4 +++-
 5 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/buyer-api/src/main/java/cn/lili/controller/lmk/VideoController.java b/buyer-api/src/main/java/cn/lili/controller/lmk/VideoController.java
index c3d16d2..9fb330c 100644
--- a/buyer-api/src/main/java/cn/lili/controller/lmk/VideoController.java
+++ b/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);
     }
 }
diff --git a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsSkuServiceImpl.java b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsSkuServiceImpl.java
index adc30c3..e05801a 100644
--- a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsSkuServiceImpl.java
+++ b/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());
         }
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/form/VideoFootPrintForm.java b/framework/src/main/java/cn/lili/modules/lmk/domain/form/VideoFootPrintForm.java
index aa5b957..7d82508 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/domain/form/VideoFootPrintForm.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/form/VideoFootPrintForm.java
@@ -19,4 +19,7 @@
     @ApiModelProperty("瑙傜湅鏃堕暱")
     private Long viewDuration;
 
+    @ApiModelProperty("瑙嗛鎾斁鑷�")
+    private String playAt;
+
 }
diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java
index 68137f4..d5c5485 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java
+++ b/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();
     }
diff --git a/framework/src/main/java/cn/lili/modules/member/entity/dos/FootPrint.java b/framework/src/main/java/cn/lili/modules/member/entity/dos/FootPrint.java
index 513d979..1486be5 100644
--- a/framework/src/main/java/cn/lili/modules/member/entity/dos/FootPrint.java
+++ b/framework/src/main/java/cn/lili/modules/member/entity/dos/FootPrint.java
@@ -42,7 +42,9 @@
     @ApiModelProperty(value = "娴忚绫诲瀷锛歡oods鍟嗗搧銆乿iew瑙嗛")
     private String viewType;
 
-    @ApiModelProperty(value = "瑙傜湅鏃堕暱锛氱")
+    @ApiModelProperty(value = "瑙傜湅鏃堕暱锛氭绉�")
     private Long viewDuration;
 
+    @ApiModelProperty(value = "鎾斁鑷筹細姣")
+    private String playAt;
 }

--
Gitblit v1.8.0