From c8ebf3038d2a7f69d9eb40f5a276dc3fa826fa9b Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Tue, 10 Aug 2021 21:42:52 +0800
Subject: [PATCH] 报名接口修改,考试计算成绩接口修改,对比答案修改为对比所有题目

---
 src/main/java/org/springblade/modules/desk/mapper/NoticeMapper.xml |   29 +++++++++++++++++++++++++++--
 1 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/springblade/modules/desk/mapper/NoticeMapper.xml b/src/main/java/org/springblade/modules/desk/mapper/NoticeMapper.xml
index 6694ee4..4682317 100644
--- a/src/main/java/org/springblade/modules/desk/mapper/NoticeMapper.xml
+++ b/src/main/java/org/springblade/modules/desk/mapper/NoticeMapper.xml
@@ -40,14 +40,39 @@
         d.dict_value AS categoryName
         FROM
         blade_notice n
-        LEFT JOIN ( SELECT * FROM blade_dict WHERE CODE = 'notice' ) d ON n.category = d.dict_key
+        LEFT JOIN
+        ( SELECT * FROM blade_dict WHERE code = 'notice' ) d
+        ON
+        n.category = d.dict_key
+        <if test="notice.deptId!=null and notice.jurisdiction!=null">
+            left join
+            blade_user bu
+            on
+            bu.dept_id = n.dept_id
+        </if>
         WHERE
-        n.is_deleted = 0 and n.tenant_id = #{notice.tenantId}
+        n.is_deleted = 0
         <if test="notice.title!=null">
             and n.title like concat(concat('%', #{notice.title}), '%')
         </if>
         <if test="notice.category!=null">
             and n.category = #{notice.category}
         </if>
+        <if test="notice.deptId!=null and notice.jurisdiction!=null">
+            and (n.dept_id = #{notice.deptId} or bu.jurisdiction = #{notice.jurisdiction}
+            or n.dept_id = 1123598813738675201
+            )
+        </if>
+        <if test="notice.deptId!=null and notice.jurisdiction==null">
+            and (n.dept_id = #{notice.deptId} and n.category=2
+            or n.dept_id = 1123598813738675201
+            )
+        </if>
+        <if test="notice.startTime!=null and notice.startTime!=''">
+            and n.release_time &gt;= #{notice.startTime}
+        </if>
+        <if test="notice.endTime!=null and notice.endTime!=''">
+            and n.release_time &lt;= #{notice.endTime}
+        </if>
     </select>
 </mapper>

--
Gitblit v1.9.3