xuekang
2024-05-13 15a0280ae9e7db96fdf0744c722d214d2cb5a0e5
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
<?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.nuvole.four.mapper.ChannelOrgConfigMapper">
 
    <select id="selectAllList" parameterType="com.nuvole.four.domain.dto.ChannelOrgConfigDto"
            resultType="com.nuvole.four.domain.dto.ChannelOrgConfigDto">
        SELECT so.id orgId,so.name orgName,so.org_code orgCode,so.pid pId,coc.update_time updateTime,IFNULL(count(coc.id),0) configCount FROM sys_org so LEFT JOIN channel_org_config coc ON coc.org_id = so.id
        <where>
            so.state = 1
            <if test="orgName != null and orgName != '' ">
                and so.name like CONCAT(CONCAT('%',#{orgName},'%'))
            </if>
            <if test="orgId != null">
                and so.pid = #{orgId}
            </if>
        </where>
        GROUP BY so.id order by sort_no
    </select>
 
    <select id="selectAll" parameterType="com.nuvole.four.domain.ChannelOrgConfig"
            resultType="com.nuvole.four.domain.ChannelOrgConfig">
        select
        <include refid="Base_Column_List"></include>
        from channel_info
        <where>
            <if test="orgId != null">
                and org_id = #{orgId}
            </if>
        </where>
    </select>
 
</mapper>