buhuazhen
6 天以前 fe058347969127ef92e85f89623abde268b29fab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.collaborativeApproval.mapper.SealApplicationManagementMapper">
 
 
    <select id="listPage" resultType="com.ruoyi.collaborativeApproval.dto.SealApplicationManagementDTO">
        SELECT
        sam.*,
        su.user_name AS create_user_name,
 
        GROUP_CONCAT(DISTINCT d.dept_name ORDER BY d.dept_id SEPARATOR ',') AS department,
 
        su1.nick_name AS approveUserName
 
        FROM seal_application_management sam
 
        LEFT JOIN sys_user su
        ON sam.create_user = su.user_id
 
        LEFT JOIN sys_user su1
        ON sam.approve_user_id = su1.user_id
 
        LEFT JOIN sys_user_dept sud
        ON su.user_id = sud.user_id
 
        LEFT JOIN sys_dept d
        ON sud.dept_id = d.dept_id
        <where>
            <if test="ew.applicationNum != null and ew.applicationNum != ''">
                and sam.application_num like concat('%',#{ew.applicationNum},'%')
            </if>
            <if test="ew.title != null and ew.title != ''">
                and sam.title like concat('%',#{ew.title},'%')
            </if>
            <if test="ew.status != null">
                and sam.status = #{ew.status}
            </if>
        </where>
        GROUP BY sam.id
    </select>
</mapper>