liujie
1 天以前 74f8b8074a2fb391b5363b4dca5f99bf31993430
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
42
43
44
45
46
<?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.stylefeng.guns.modular.system.dao.TSystemConfigMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TSystemConfig">
        <id column="id" property="id" />
        <result column="type" property="type" />
        <result column="content" property="content" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, type, content
    </sql>
    <select id="getList" resultType="com.stylefeng.guns.modular.system.controller.resp.CommissionAuditResp">
        select
            a.id,
            a.commitTime,
            a.status,
            b.branchOfficeName,
            b.principal,
            b.principalPhone
        from
            t_branch_office b
        left join t_system_config a on b.id = a.companyId
        where
            1=1 AND a.companyType = 2 AND a.type = 2 AND b.status = 1 AND a.companyId != 1
        <if test="branchOfficeName != null and branchOfficeName != ''">
            and b.branchOfficeName like concat('%',#{branchOfficeName},'%')
        </if>
       <if test="principal != null and principal != ''">
           and b.principal like concat('%',#{principal},'%')
       </if>
        <if test="principalPhone != null and principalPhone != ''">
            and b.principalPhone like concat('%',#{principalPhone},'%')
        </if>
        <if test="status != null and status != -1">
            and a.status = #{status}
        </if>
        <if test="status != null and status == -1">
            and a.id IS NULL
        </if>
    </select>
 
</mapper>