From 8d43111bd0e598bc0b2014cbfa69a32e74959dff Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 15 Dec 2021 19:24:05 +0800
Subject: [PATCH] ftp sql 同步封装
---
src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml b/src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml
index 1400c89..d5fdc5c 100644
--- a/src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml
+++ b/src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml
@@ -45,6 +45,8 @@
sj.id = si.jurisdiction
WHERE
1=1
+ and bu.status = 1
+ and bu.is_deleted = 0
<if test="accreditationRecords.deptName!=null and accreditationRecords.deptName!=''">
and bt.dept_name like concat('%', #{accreditationRecords.deptName},'%')
</if>
@@ -93,6 +95,7 @@
<if test="accreditationRecords.endTime!=null and accreditationRecords.endTime!='' and accreditationRecords.endTime!='undefined'">
and sar.create_time <= #{accreditationRecords.endTime}
</if>
+ order by sar.id desc
</select>
<!--自定义详情信息-->
@@ -208,6 +211,7 @@
<if test="accreditationRecords.endTime!=null and accreditationRecords.endTime!='' and accreditationRecords.endTime!='undefined'">
and sar.create_time <= #{accreditationRecords.endTime}
</if>
+ order by sar.id desc
</select>
@@ -304,6 +308,7 @@
<if test="accreditationRecords.endTime!=null and accreditationRecords.endTime!='' and accreditationRecords.endTime!='undefined'">
and sar.create_time <= #{accreditationRecords.endTime}
</if>
+ order by sar.id desc
</select>
@@ -400,6 +405,7 @@
<if test="accreditationRecords.endTime!=null and accreditationRecords.endTime!='' and accreditationRecords.endTime!='undefined'">
and sar.create_time <= #{accreditationRecords.endTime}
</if>
+ order by sar.id desc
</select>
<!--根据用户 id 查询上岗证申请记录-->
@@ -410,6 +416,6 @@
<!--根据用户 id 查询当前人员是否有待审核和审核通过的记录数-->
<select id="getAccreditationRecordsByUserIdAuditCount" resultType="java.lang.Integer">
- select count(*) from sys_accreditation_records where (audit_status = 1 or audit_status = 3) and user_id = #{userId} and type = 2
+ select count(*) from sys_accreditation_records where (audit_status = 1 or audit_status = 2) and user_id = #{userId} and type = #{type}
</select>
</mapper>
--
Gitblit v1.9.3