刘光辉
3 小时以前 06f314545ac3514d7ce28939920866ae8188d31c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.dmsMapper.DmsPermissionGroupMapper">
    <resultMap id="displayNameMap" type="jnpf.permission.entity.PermissionGroupEntity">
        <id property="id" column="f_id"/>
        <result property="fullName" column="f_full_name"/>
    </resultMap>
    <select id="selectDisplayByIds" resultMap="displayNameMap">
        SELECT f_id, f_full_name
        FROM base_permission_group
        WHERE f_delete_mark IS NULL
        <choose>
            <when test="ids != null and ids.size() > 0">
                AND f_id IN
                <foreach collection="ids" item="id" open="(" separator="," close=")">
                    #{id}
                </foreach>
            </when>
            <otherwise>AND 1 = 0</otherwise>
        </choose>
    </select>
</mapper>