From 5bdba4f712b203db5acdd981922a5bc1706b29ff Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期一, 11 九月 2023 19:15:43 +0800
Subject: [PATCH] #
---
src/main/resources/mapper/PlanMapper.xml | 64 +++++++++++++++++++++++++++-----
1 files changed, 54 insertions(+), 10 deletions(-)
diff --git a/src/main/resources/mapper/PlanMapper.xml b/src/main/resources/mapper/PlanMapper.xml
index 7d278b0..f5e7141 100644
--- a/src/main/resources/mapper/PlanMapper.xml
+++ b/src/main/resources/mapper/PlanMapper.xml
@@ -34,6 +34,7 @@
<result column="update_by" property="updateBy" />
<result column="update_time" property="updateTime" />
<result column="memo" property="memo" />
+ <result column="user_xml_sel_phone" property="userXmlSelPhone" />
</resultMap>
@@ -63,20 +64,33 @@
WHERE 1=1
<choose>
<when test="deptId != null and deptId != ''">
- AND (CHARINDEX(','+#{deptId}+',', ','+sd.path+',') > 0 OR sd.id = #{deptId})
+ AND ( (CHARINDEX(','+#{deptId}+',', ','+sd.path+',') > 0 OR sd.id = #{deptId})
+ or
+ (
+ user_id = #{userId}
+ or
+ mp.id in
+ (
+ select
+ plan_id
+ from man_plan_foll
+ where 1=1
+ and user_id = #{userId}
+ )
+ ))
</when>
<otherwise>
and
(
- user_id = #{userId}
- or
- mp.id in
- (
- select
- order_id
- from man_order_foll
- where 1=1
- and user_id = #{userId}
+ user_id = #{userId}
+ or
+ mp.id in
+ (
+ select
+ plan_id
+ from man_plan_foll
+ where 1=1
+ and user_id = #{userId}
)
)
</otherwise>
@@ -94,4 +108,34 @@
ORDER BY mp.create_time DESC
</select>
+ <select id="selectPlanUrlPlanIdUrl" resultType="java.lang.String">
+ select url from man_plan_url
+ where 1=1
+ and id=#{id}
+ </select>
+
+ <select id="selectPlanUrlPlanIdName" resultType="java.lang.String">
+ select name from man_plan_url
+ where 1=1
+ and id=#{id}
+ </select>
+
+ <select id="selectPlanUrlPlanIdSize" resultType="java.lang.Long">
+ select file_size from man_plan_url
+ where 1=1
+ and id=#{id}
+ </select>
+
+ <select id="selectPlanUrlId" resultType="java.lang.Integer">
+ select id from man_plan_url
+ where 1=1
+ and plan_id=#{planId}
+ </select>
+
+ <insert id="increasePlanUrl">
+ insert into man_plan_url(plan_id,url,name,file_size)
+ values(#{planId},#{url},#{name},#{size})
+ </insert>
+
+
</mapper>
--
Gitblit v1.9.1