From d9dfe81a9e819d9da2d41cb57d674eff894c6605 Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期二, 05 九月 2023 11:36:21 +0800
Subject: [PATCH] 场地类型管理、场地管理、课包类型管理、教练管理、教练类型管理、福利视频分类管理、体测预约

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

diff --git a/cloud-server-activity/src/main/resources/mapper/BenefitsVideoClassificationMapper.xml b/cloud-server-activity/src/main/resources/mapper/BenefitsVideoClassificationMapper.xml
index df28755..23af1fb 100644
--- a/cloud-server-activity/src/main/resources/mapper/BenefitsVideoClassificationMapper.xml
+++ b/cloud-server-activity/src/main/resources/mapper/BenefitsVideoClassificationMapper.xml
@@ -2,5 +2,32 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.dsh.activity.mapper.BenefitsVideoClassificationMapper">
 
+    <update id="changeState">
+        update t_benefits_video_classification set
+        state = #{type}
+        <where>
+            <if test="ids != null and ids.size()>0">
+                AND t_benefits_video_classification.id IN
+                <foreach collection="ids" separator="," item="id" open="(" close=")">
+                    #{id}
+                </foreach>
+            </if>
+        </where>
+    </update>
 
+    <select id="listAll" resultType="com.dsh.activity.model.TQueryBenefitsVO">
+        select t1.*,COUNT(t2.id) AS `count`,t2.courseId courseId from t_benefits_video_classification t1
+        left join t_benefits_videos t2 on t1.id = t2.benefitsVideoClassificationId
+        <where>
+            <if test="query.position!=null and query.position!= ''">
+                and t1.position = #{query.position}
+            </if>
+            <if test="query.name!=null and query.name!= ''">
+                and t1.name like concat('%',#{query.name},'%')
+            </if>
+            AND (t2.id IS NULL OR t2.state != 3 OR t2.state != 2)
+        </where>
+        GROUP BY t1.id
+        order by t1.sort DESC
+    </select>
 </mapper>

--
Gitblit v1.7.1