heheng
8 天以前 3cc8d1cc3662d88fe7f3666fb1f99e1b19411424
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
<?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.gkhy.exam.system.mapper.InternalAuditPersonMapper">
 
    <select id="selectPersonList" resultType="com.gkhy.exam.system.domain.InternalAuditPerson">
        SELECT
            iap.`id`,
            iap.`company_id`,
            sc.`name` as company_name,
            iap.`person_id`,
            es.`name` as person_name,
            es.dept_id,
            sd.dept_name,
            es.duty,
            iap.`speciality`,
            iap.`create_by`,
            iap.`create_time`,
            iap.`update_by`,
            iap.`update_time`,
            iap.`del_flag`
        FROM `internal_audit_person` iap
                 LEFT JOIN ex_student es on iap.person_id = es.id
                 LEFT JOIN sys_dept sd on es.dept_id = sd.dept_id
                 LEFT JOIN sys_company sc on iap.company_id = sc.id
        WHERE iap.del_flag = 1
        <if test="companyId!=null and companyId!=''">
            and iap.company_id = #{companyId}
        </if>
        ORDER BY create_time ASC
    </select>
</mapper>