自动化立体仓库 - WCS系统
*
lsh
2025-04-18 c2532afffe685e77cf60b66644b921094adc09a4
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
<?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.zy.system.mapper.RoleMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.system.entity.Role">
        <id column="ID" property="id" />
        <result column="CODE" property="code" />
        <result column="NAME" property="name" />
        <result column="LEADER" property="leader" />
        <result column="LEVEL" property="level" />
 
    </resultMap>
 
    <select id="selectRoleList" resultMap="BaseResultMap">
        SELECT * FROM "SOURCE"."sys_role"
        WHERE 1=1
        <if test="leaderIdList != null">
            and ID not in
            <foreach collection="leaderIdList" item="item" index="index" separator="," open="(" close=")">
                #{item}
            </foreach>
        </if>
        ORDER BY ID DESC
        LIMIT #{pageSize} OFFSET ((#{pageNumber} - 1) * #{pageSize});
    </select>
 
    <select id="selectRoleListTotal" resultType="Long">
        SELECT count(1) FROM "SOURCE"."sys_role"
        WHERE 1=1
        <if test="leaderIdList != null">
            and ID not in
            <foreach collection="leaderIdList" item="item" index="index" separator="," open="(" close=")">
                #{item}
            </foreach>
        </if>
    </select>
 
</mapper>