From 564bf7ab6a639c2c4557d35b8fd9b51dca60a738 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期二, 22 八月 2023 13:32:34 +0800
Subject: [PATCH] #规则完善
---
src/main/resources/mapper/PlanMapper.xml | 61 ++++++++++++++++++++++++++----
1 files changed, 52 insertions(+), 9 deletions(-)
diff --git a/src/main/resources/mapper/PlanMapper.xml b/src/main/resources/mapper/PlanMapper.xml
index 7d278b0..666b5e6 100644
--- a/src/main/resources/mapper/PlanMapper.xml
+++ b/src/main/resources/mapper/PlanMapper.xml
@@ -64,19 +64,32 @@
<choose>
<when test="deptId != null and 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 +107,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