From e636396c6c16f56931edc8b57b8efb6b9a165786 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期五, 29 八月 2025 17:59:09 +0800
Subject: [PATCH] 评论

---
 framework/src/main/resources/mapper/lmk/MyCollectMapper.xml |   93 +++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 87 insertions(+), 6 deletions(-)

diff --git a/framework/src/main/resources/mapper/lmk/MyCollectMapper.xml b/framework/src/main/resources/mapper/lmk/MyCollectMapper.xml
index 3f06bcb..f589c1a 100644
--- a/framework/src/main/resources/mapper/lmk/MyCollectMapper.xml
+++ b/framework/src/main/resources/mapper/lmk/MyCollectMapper.xml
@@ -54,16 +54,97 @@
           AND ref_id IN <foreach collection="videoIds" open="(" item="videoId" close=")" separator=",">#{videoId}</foreach>
     </select>
 
-    <select id="countNumGroupByType" parameterType="string" resultType="cn.lili.modules.lmk.domain.vo.CollectTypeNumVO">
+    <select id="countNumGroupByVideo" parameterType="string" resultType="cn.lili.modules.lmk.domain.vo.CollectTypeNumVO">
         SELECT
-               ref_id as id,
-               count(id) as countNum
+               LV.id as id,
+               count(LMC.ref_id) as countNum
         FROM
-             lmk_my_collect
+             lmk_video LV
+                LEFT JOIN lmk_my_collect LMC ON LV.id = LMC.ref_id AND LMC.collect_type = 'video' AND LMC.delete_flag = 0
         WHERE
-              collect_type = #{type} AND delete_flag = 0
+            LV.collect_num_job = 1 AND LV.delete_flag = 0 AND LV.status = '1'
         GROUP BY
-            ref_id
+            LMC.ref_id
     </select>
 
+
+    <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
+    <resultMap id="activityBaseResult" type="cn.lili.modules.lmk.domain.vo.ActivityVO">
+        <result column="activity_name" property="activityName" />
+        <result column="activity_type" property="activityType"/>
+        <result column="report_start_time" property="reportStartTime" />
+        <result column="report_end_time" property="reportEndTime" />
+        <result column="start_time" property="startTime" />
+
+        <result column="end_time" property="endTime" />
+        <result column="status" property="status" />
+        <result column="recommend" property="recommend" />
+        <result column="cover" property="cover" />
+        <result column="cover_type" property="coverType" />
+        <result column="limit_user_num" property="limitUserNum" />
+        <result column="activity_location" property="activityLocation" />
+        <result column="activity_content" property="activityContent" />
+    </resultMap>
+    <select id="getActivityCollectPage" resultMap="activityBaseResult">
+        SELECT
+            LA.*
+        FROM lmk_my_collect LMC
+                 LEFT JOIN lmk_activity LA
+                           ON LMC.ref_id = LA.id AND LMC.delete_flag = 0
+        WHERE LMC.collect_type = 'activity' and LMC.user_id = #{userId} AND LA.id IS NOT NULL
+    </select>
+    <resultMap id="videoBaseResult" type="cn.lili.modules.lmk.domain.vo.VideoVO">
+        <id column="id" property="id"/>
+        <result column="author_id" property="authorId" />
+        <result column="authorName" property="authorName" />
+        <result column="cover_url" property="coverUrl" />
+        <result column="video_file_key" property="videoFileKey" />
+        <result column="video_fit" property="videoFit" />
+        <result column="title" property="title" />
+        <result column="video_duration" property="videoDuration" />
+        <result column="recommend" property="recommend" />
+        <result column="status" property="status" />
+        <result column="play_num" property="playNum" />
+        <result column="collect_num" property="collectNum" />
+        <result column="comment_num" property="commentNum" />
+        <result column="weight" property="weight" />
+        <result column="audit_pass_time" property="auditPassTime" />
+        <result column="update_time" property="updateTime" />
+    </resultMap>
+
+    <resultMap id="storeBaseResult" type="cn.lili.modules.store.entity.vos.StoreBasicInfoVO">
+        <id column="id" property="storeId"/>
+        <result column="store_name" property="storeName"/>
+        <result column="company_address_path" property="companyAddressPath"/>
+        <result column="store_logo" property="storeLogo"/>
+        <result column="store_desc" property="storeDesc"/>
+    </resultMap>
+
+    <select id="getStoreCollectPage" resultMap="storeBaseResult">
+        SELECT
+            LS.*
+        FROM lmk_my_collect LMC
+                 LEFT JOIN li_store LS
+                           ON LMC.ref_id = LS.id
+        WHERE LMC.collect_type = 'store' and LMC.user_id = #{userId}
+         and  LS.delete_flag= 0 and LMC.delete_flag =0
+    </select>
+
+    <resultMap id="goodsBaseResult" type="cn.lili.modules.goods.entity.vos.GoodsVO">
+        <id column="id" property="id"/>
+        <result column="goods_name" property="goodsName"/>
+        <result column="price" property="price"/>
+        <result column="mobile_intro" property="mobileIntro"/>
+        <result column="original" property="original"/>
+    </resultMap>
+
+    <select id="getGoodsCollectPage" resultMap="goodsBaseResult">
+        SELECT
+            LG.*
+        FROM lmk_my_collect LMC
+                 LEFT JOIN li_goods LG
+                           ON LMC.ref_id = LG.id
+        WHERE LMC.collect_type = 'goods' and LMC.user_id = #{userId}
+          and  LG.delete_flag= 0 and LMC.delete_flag =0
+    </select>
 </mapper>

--
Gitblit v1.8.0