From c1a209367f08974e762443a58a1904dc727b08ed Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sat, 07 Aug 2021 17:51:22 +0800
Subject: [PATCH] 数据同步去除

---
 src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
index 6d579bc..0222fc2 100644
--- a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
+++ b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -41,6 +41,9 @@
         <if test="information.jurisdiction!=null and information.jurisdiction!=''">
             and jurisdiction=#{jurisdiction}
         </if>
+        <if test="information.departmentid!=null and information.departmentid!=''">
+            and departmentid=#{departmentid}
+        </if>
     </select>
 
     <delete id="deleteIn">
@@ -158,4 +161,39 @@
                  LEFT JOIN (SELECT COUNT(*) AS numz, dept_id FROM blade_user GROUP BY dept_id) B ON A.deptid = B.dept_id
         WHERE A.deptid = #{deptid}
     </select>
+
+    <!--查询培训单位信息(可以报名)-->
+    <select id="securityPage" resultType="org.springblade.modules.information.vo.InformationVO">
+        select
+            si.*,bd.dept_name deptName
+        from
+           sys_information si
+        left join
+            blade_dept bd
+        on
+            si.departmentid = bd.id
+        left join
+            sys_train_exam ste
+        on
+            ste.dept_id = bd.id
+        where 1=1
+        and ste.audit_status = 1
+        <if test="information.deptName!=null and information.deptName!=''">
+            and bd.dept_name like concat(concat('%', #{information.deptName}),'%')
+        </if>
+        <if test="information.representative!=null and information.representative!=''">
+            and representative like concat(concat('%', #{information.representative}),'%')
+        </if>
+        <if test="information.stats!=null and information.stats!=''">
+            and stats=#{stats}
+        </if>
+        <if test="information.jurisdiction!=null and information.jurisdiction!=''">
+            and si.jurisdiction=#{jurisdiction}
+        </if>
+        <if test="information.departmentid!=null and information.departmentid!=''">
+            and departmentid=#{departmentid}
+        </if>
+    </select>
+
+
 </mapper>

--
Gitblit v1.9.3