heheng
2025-11-27 af31f0a78ec1932cec1a7e99482e7d850e60576e
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
<?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.ProcessInspectionMapper">
 
    <select id="selectByCompanyidAndTypeList" resultType="com.gkhy.exam.system.domain.ProcessInspection">
        SELECT
            pi.`id`,
            pi.`company_id`,
            sc.`name` as company_name,
            pi.`type`,
            pi.`file_name`,
            pi.`file_path`,
            pi.`del_flag`,
            pi.`create_by`,
            pi.`create_time`,
            pi.`update_by`,
            pi.`update_time`,
            pi.item_id
        FROM
            `process_inspection` pi
                LEFT JOIN sys_company sc ON pi.company_id = sc.id
        WHERE
            pi.del_flag = 0
        <if test="companyId!=null">
            and pi.company_id =#{companyId}
        </if>
        <if test="templateType!=null">
            and pi.type = #{templateType}
        </if>
        <if test="itemId!=null">
            and pi.item_id = #{itemId}
        </if>
 
    </select>
</mapper>