From 4f89ece90fca89b667a244376605f9190a234b80 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期二, 24 六月 2025 20:04:29 +0800
Subject: [PATCH] 视频商品购买数据结构调整
---
framework/src/main/java/cn/lili/modules/lmk/domain/entity/VideoGoods.java | 4 ++++
/dev/null | 32 --------------------------------
framework/src/main/java/cn/lili/modules/lmk/domain/vo/VideoGoodsDetailVO.java | 3 +++
framework/src/main/resources/mapper/lmk/VideoMapper.xml | 5 +++++
framework/src/main/java/cn/lili/modules/lmk/domain/vo/VideoGoodsPublishVO.java | 3 +++
framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java | 2 ++
6 files changed, 17 insertions(+), 32 deletions(-)
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/entity/VideoGoods.java b/framework/src/main/java/cn/lili/modules/lmk/domain/entity/VideoGoods.java
index 1993606..8187ff4 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/domain/entity/VideoGoods.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/entity/VideoGoods.java
@@ -31,6 +31,10 @@
/** 鍟嗗搧id */
private String goodsId;
+ @TableField("goods_sku_id")
+ /** 鍟嗗搧sku id */
+ private String goodsSkuId;
+
@TableField("order_num")
/** 鎺掑簭 */
private Integer orderNum;
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/VideoGoodsDetailVO.java b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/VideoGoodsDetailVO.java
index e765747..a98f5dc 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/VideoGoodsDetailVO.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/VideoGoodsDetailVO.java
@@ -16,6 +16,9 @@
@ApiModelProperty("鍟嗗搧id")
private String goodsId;
+ @ApiModelProperty("鍟嗗搧skuid")
+ private String id;
+
@ApiModelProperty("鍟嗗搧鍚嶇О")
private String goodsName;
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/VideoGoodsPublishVO.java b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/VideoGoodsPublishVO.java
index 3d970f2..1d8cd03 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/VideoGoodsPublishVO.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/VideoGoodsPublishVO.java
@@ -15,6 +15,9 @@
@ApiModelProperty("鍟嗗搧id")
private String goodsId;
+ @ApiModelProperty("sku")
+ private String goodsSkuId;
+
@ApiModelProperty("鍟嗗搧鏁伴噺")
private Integer goodsNum;
diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/VideoGoodsVO.java b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/VideoGoodsVO.java
deleted file mode 100644
index 8f7488d..0000000
--- a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/VideoGoodsVO.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package cn.lili.modules.lmk.domain.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-/**
- * 瑙嗛鎮寕鍟嗗搧淇℃伅
- *
- * @author锛歺p
- * @date锛�2025/5/22 14:17
- */
-@Data
-public class VideoGoodsVO {
-
- private String id;
-
- @ApiModelProperty("鍥剧墖鍦板潃")
- private String imageUrl = "https://picsum.photos/200/200?random=2";
-
- @ApiModelProperty("鍟嗗搧鍚嶇О")
- private String name = "鎺ㄦ祦";
-
- @ApiModelProperty("浠锋牸")
- private String price = "10";
-
- @ApiModelProperty("鍘熶环")
- private String originalPrice = "48.9";
-
- @ApiModelProperty("宸插敭鏁伴噺")
- private Long saleNum = 125L;
-
-}
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 0a734f9..ca75179 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
@@ -197,6 +197,7 @@
VideoGoods e = new VideoGoods();
e.setVideoId(video.getId());
e.setGoodsId(form.getGoodsList().get(i).getGoodsId());
+ e.setGoodsSkuId(form.getGoodsList().get(i).getGoodsSkuId());
e.setGoodsNum(form.getGoodsList().get(i).getGoodsNum());
e.setOrderNum(i);
videoGoods.add(e);
@@ -260,6 +261,7 @@
VideoGoods e = new VideoGoods();
e.setVideoId(video.getId());
e.setGoodsId(form.getGoodsList().get(i).getGoodsId());
+ e.setGoodsSkuId(form.getGoodsList().get(i).getGoodsSkuId());
e.setGoodsNum(form.getGoodsList().get(i).getGoodsNum());
e.setOrderNum(i);
videoGoods.add(e);
diff --git a/framework/src/main/resources/mapper/lmk/VideoMapper.xml b/framework/src/main/resources/mapper/lmk/VideoMapper.xml
index d4ce727..248411a 100644
--- a/framework/src/main/resources/mapper/lmk/VideoMapper.xml
+++ b/framework/src/main/resources/mapper/lmk/VideoMapper.xml
@@ -28,6 +28,7 @@
<resultMap id="VideoGoodsMap" type="cn.lili.modules.lmk.domain.vo.VideoGoodsDetailVO">
<result column="goods_id" property="goodsId"/>
+ <result column="goods_sku_id" property="id"/>
<result column="goods_num" property="goodsNum"/>
<result column="goods_name" property="goodsName"/>
<result column="thumbnail" property="thumbnail"/>
@@ -37,6 +38,7 @@
<select id="getVideoGoods" parameterType="string" resultMap="VideoGoodsMap">
SELECT
LVG.goods_id,
+ LVG.goods_sku_id,
LVG.goods_num,
LVG.order_num,
LG.goods_name,
@@ -219,6 +221,7 @@
LV.weight,
LV.audit_pass_time,
LV.update_time,
+ LV.create_time,
LV.video_content_type,
LV.video_type,
LV.video_imgs,
@@ -230,6 +233,8 @@
LEFT JOIN li_member LM ON LV.author_id = LM.id
WHERE
LV.delete_flag = 0 AND LV.status = '1' AND LV.video_type = #{query.videoType}
+ ORDER BY
+ LV.create_time DESC
</select>
<select id="recommendHealthVideo" resultMap="WxResultMap">
SELECT
--
Gitblit v1.8.0