From 045b55722b25ccc77d88671c5d6df309edb8a66d Mon Sep 17 00:00:00 2001
From: 钟日健 <5689795+arsn@user.noreply.gitee.com>
Date: Tue, 22 Feb 2022 16:00:34 +0800
Subject: [PATCH] 1. 保安员新增异步推送数据至群访用户表 2. 会员标记接口新增,会员标记成功,则创建会员记录和会员题库记录(包含120道题目) 3. web 端考试开始,查询题目判断用户是否为会员,如果为会员则从会员题库获取当前人员的考试题目(从120道题中随机抽取60道)

---
 src/main/java/org/springblade/modules/desk/mapper/NoticeMapper.xml |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 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..83516a1 100644
--- a/src/main/java/org/springblade/modules/desk/mapper/NoticeMapper.xml
+++ b/src/main/java/org/springblade/modules/desk/mapper/NoticeMapper.xml
@@ -37,17 +37,37 @@
     <select id="selectNoticePage" resultMap="noticeVOResultMap">
         SELECT
         n.*,
-        d.dict_value AS categoryName
+        d.dict_value AS categoryName,
+        bd.dept_name deptName
         FROM
         blade_notice n
-        LEFT JOIN ( SELECT * FROM blade_dict WHERE CODE = 'notice' ) d ON n.category = d.dict_key
+        left join
+        blade_dept bd
+        on
+        bd.id = n.dept_id
+        LEFT JOIN
+        ( SELECT * FROM blade_dict WHERE code = 'notice' ) d
+        ON
+        n.category = d.dict_key
         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.type!=null">
+            and n.type = #{notice.type}
+        </if>
+        <if test="notice.deptId!=null and notice.deptId!=''">
+            and n.dept_id = #{notice.deptId}
+        </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