From 883fa144574c77883be0f405a36a9c3cfb6c35d4 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 06 九月 2023 13:49:53 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/PlanMapper.xml |   62 ++++++++++++++++++++++++++----
 1 files changed, 53 insertions(+), 9 deletions(-)

diff --git a/src/main/resources/mapper/PlanMapper.xml b/src/main/resources/mapper/PlanMapper.xml
index 7d278b0..ea4a48d 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>
 
@@ -64,19 +65,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 +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