From aa43a92c7ec9053dbaef92fe5ccb3011b670442c Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期三, 12 七月 2023 11:46:21 +0800
Subject: [PATCH] 更新线上视频奖励模块接口

---
 cloud-server-activity/src/main/resources/mapper/BenefitsVideosMapper.xml |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/cloud-server-activity/src/main/resources/mapper/BenefitsVideosMapper.xml b/cloud-server-activity/src/main/resources/mapper/BenefitsVideosMapper.xml
index 8350761..a89bf74 100644
--- a/cloud-server-activity/src/main/resources/mapper/BenefitsVideosMapper.xml
+++ b/cloud-server-activity/src/main/resources/mapper/BenefitsVideosMapper.xml
@@ -3,4 +3,32 @@
 <mapper namespace="com.dsh.activity.mapper.BenefitsVideosMapper">
 
 
+    <select id="queryBenefitsVideosList" resultType="map">
+        select * from (
+            (select
+            id,
+            courseId,
+            integral,
+            0 as study
+            from t_benefits_videos where state = 1 and id not in (select benefitsVideosId from t_user_benefits_videos where appUserId = #{uid})
+            <if test="null != classificationId">
+                and benefitsVideoClassificationId = #{classificationId}
+            </if>
+            order by insertTime desc)
+
+            union all
+
+            (select
+            id,
+            courseId,
+            integral,
+            1 as study
+            from t_benefits_videos where state = 1 and id in (select benefitsVideosId from t_user_benefits_videos where appUserId = #{uid})
+            <if test="null != classificationId">
+                and benefitsVideoClassificationId = #{classificationId}
+            </if>
+            order by insertTime desc)
+        ) as a limit #{pageSize}, #{pageNo}
+    </select>
+
 </mapper>

--
Gitblit v1.7.1