From d9b5d701a793ced84a26d4bf64f4767ac29c0189 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Tue, 22 Feb 2022 11:54:25 +0800
Subject: [PATCH] 去除发布人不得抢单

---
 src/main/java/org/springblade/modules/taskqd/mapper/TaskqdMapper.xml |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/springblade/modules/taskqd/mapper/TaskqdMapper.xml b/src/main/java/org/springblade/modules/taskqd/mapper/TaskqdMapper.xml
index 51499f2..4adbc6d 100644
--- a/src/main/java/org/springblade/modules/taskqd/mapper/TaskqdMapper.xml
+++ b/src/main/java/org/springblade/modules/taskqd/mapper/TaskqdMapper.xml
@@ -38,6 +38,11 @@
         </if>
         where id = #{id}
     </update>
+    <update id="updateRtype">
+        update sys_taskqd
+        SET rtype=#{type}
+        where id = #{rid}
+    </update>
 
 
     <!--日常任务列表-->
@@ -53,6 +58,7 @@
         WHERE id in (${serid})
     </select>
 
+    <!--     and !find_in_set(#{serid}, serid)-->
     <select id="selectLi" resultMap="taskResultMap">
         SELECT A.*,IFNULL(B.num,0) as nums FROM (
         select qd.* from sys_taskqd qd LEFT JOIN sys_jurisdiction j ON j.id = qd.jurisdiction where 1=1 AND
@@ -62,9 +68,8 @@
             serid=#{serid} GROUP BY hdid,serid) B ON A.id=B.hdid
         </if>
         <if test="type==1">
-            <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
-                and !find_in_set(#{serid}
-                , serid) and (j.id =#{jurisdiction} or
+            <if test="jurisdiction!='1372091709474910209'">
+                and (j.id =#{jurisdiction} or
                 j.parent_id = #{jurisdiction})
             </if>
             ) A LEFT JOIN (SELECT
@@ -72,13 +77,14 @@
             as num,hdid FROM sys_taskfk GROUP BY hdid) B ON A.id=B.hdid
         </if>
     </select>
+    <!--   !find_in_set(#{serid}
+                , serid)
+              AND -->
     <select id="selectNum" resultType="java.lang.Integer">
         SELECT COUNT(*) as num
         FROM sys_taskqd qd
                  LEFT JOIN sys_jurisdiction j ON j.id = qd.jurisdiction
-        WHERE !find_in_set(#{serid}
-            , serid)
-          AND jnum!=num
+        WHERE jnum!=num
           and (j.id =#{jurisdiction}
            or
             j.parent_id = #{jurisdiction})

--
Gitblit v1.9.3