自动化立体仓库 - 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
40
41
42
<?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.UserMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.system.entity.User">
        <id column="ID" property="id" />
        <result column="HOST_ID" property="hostId" />
        <result column="USERNAME" property="username" />
        <result column="MOBILE" property="mobile" />
        <result column="PASSWORD" property="password" />
        <result column="ROLE_ID" property="roleId" />
        <result column="CREATE_TIME" property="createTime" />
        <result column="STATUS" property="status" />
 
    </resultMap>
 
    <select id="selectUserList" resultMap="BaseResultMap">
        SELECT * FROM "SOURCE"."sys_user"
        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="selectUserListTotal" resultType="Long">
        SELECT count(1) FROM "SOURCE"."sys_user"
        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>