智慧保安后台管理-外网项目备份
guoshilong
2024-01-10 2fde25922c84f41e482f473f508a08f5fc3cdf23
src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml
@@ -16,7 +16,8 @@
            ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING( bu.cardid,7,4),0) age,
            bu1.real_name applyName,
            bt1.dept_name applyUnit,
            bu.user_type userType
            bu.user_type userType,
            bu.paper_time as userPaperTime
        FROM
            sys_accreditation_records sar
        left join
@@ -32,6 +33,9 @@
        WHERE  1=1
        and bu.status = 1
        and bu.is_deleted = 0
        <if test="accreditationRecords.userPaperTime != null and accreditationRecords.userPaperTime !=''">
            AND DATE_FORMAT(bu.paper_time,'%Y-%m-%d')  = #{accreditationRecords.userPaperTime}
        </if>
        <if test="accreditationRecords.deptName!=null and  accreditationRecords.deptName!=''">
            and bt.dept_name like concat('%', #{accreditationRecords.deptName},'%')
        </if>