ludc
2023-04-07 7df1d61319149a666e8b2801a3c89c1d80900d2e
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?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.vci.ubcs.system.mapper.ValueRangeMapper">
 
    <resultMap type="com.vci.ubcs.system.entity.ValueRange" id="ValueRangeMap">
        <result property="id" column="ID" jdbcType="VARCHAR"/>
        <result property="value" column="VALUE" jdbcType="VARCHAR"/>
        <result property="combinationId" column="COMBINATION_ID" jdbcType="VARCHAR"/>
        <result property="updateTime" column="CREATEUSER" jdbcType="VARCHAR"/>
        <result property="updateTime" column="UPDATETIME" jdbcType="TIMESTAMP"/>
        <result property="createUser" column="UPDATEUSER" jdbcType="VARCHAR"/>
        <result property="createTime" column="CREATETIME" jdbcType="TIMESTAMP"/>
    </resultMap>
 
    <!--查询指定行数据-->
    <select id="queryAllByLimit" resultMap="ValueRangeMap">
        select
          ID, VALUE, COMBINATION_ID, CREATEUSER, UPDATETIME, UPDATEUSER, CREATETIME
        from PL_SYS_VALUE_RANGE
        <where>
            <if test="id != null and id != ''">
                and ID = #{id}
            </if>
            <if test="value != null and value != ''">
                and VALUE = #{value}
            </if>
            <if test="combinationId != null and combinationId != ''">
                and COMBINATION_ID = #{combinationId}
            </if>
            <if test="createuser != null and createuser != ''">
                and CREATEUSER = #{createuser}
            </if>
            <if test="updatetime != null">
                and UPDATETIME = #{updatetime}
            </if>
            <if test="updateuser != null and updateuser != ''">
                and UPDATEUSER = #{updateuser}
            </if>
            <if test="createtime != null">
                and CREATETIME = #{createtime}
            </if>
        </where>
        limit #{pageable.offset}, #{pageable.pageSize}
    </select>
 
    <!--统计总行数-->
    <select id="count" resultType="java.lang.Long">
        select count(1)
        from PL_SYS_VALUE_RANGE
        <where>
            <if test="id != null and id != ''">
                and ID = #{id}
            </if>
            <if test="value != null and value != ''">
                and VALUE = #{value}
            </if>
            <if test="combinationId != null and combinationId != ''">
                and COMBINATION_ID = #{combinationId}
            </if>
            <if test="createuser != null and createuser != ''">
                and CREATEUSER = #{createuser}
            </if>
            <if test="updatetime != null">
                and UPDATETIME = #{updatetime}
            </if>
            <if test="updateuser != null and updateuser != ''">
                and UPDATEUSER = #{updateuser}
            </if>
            <if test="createtime != null">
                and CREATETIME = #{createtime}
            </if>
        </where>
    </select>
 
    <select id="queryByCombinationIds" resultType="String">
        SELECT "VALUE" FROM PL_SYS_VALUE_RANGE PSVR
        WHERE PSVR.COMBINATION_ID IN (
            <foreach collection="combinationIds" item="id" separator=",">
                #{id}
            </foreach>
        )
    </select>
 
</mapper>