zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
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
<?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" >
<!-- Table:epc_app_stander_def_{rule} -->
<mapper namespace="com.changhong.epc.parsing.mapper.tenant.MasterValueMapper">
 
    <select id="selectMasterValueList" parameterType="com.changhong.epc.bean.tenant.master.MasterValue" resultType="com.changhong.epc.bean.tenant.master.MasterValue">
        select
          ID id,
          DEFINE_CODE defineCode,
          ELE_CODE eleCode,
          ELE_VALUE eleValue,
          ROW_NO rowNo
        from epc_master_value_{rule}
        where DEFINE_CODE = #{defineCode}
        and DEL_FLAG = 0
        ORDER BY ROW_NO
    </select>
 
    <update id="updateMasterVal">
        UPDATE epc_master_value_{rule}
        SET ELE_VALUE = #{mv.eleValue}
        WHERE
            DEFINE_CODE = #{mv.defineCode}
        AND ELE_CODE = #{mv.eleCode}
        AND ROW_NO = #{mv.rowNo}
 
    </update>
 
    <delete id="delMasterValue" >
        DELETE
        FROM
            epc_master_value_{rule}
        WHERE
            define_code = #{mv.defineCode}
        and
            row_no = #{mv.rowNo}
 
    </delete>
    
    <select id="selectByCode" resultType="int">
        SELECT
            COUNT(*)
        FROM
            epc_master_value_{rule}
        WHERE
            DEFINE_CODE = #{code} and ele_code = #{eleCode} and ROW_NO = #{rowNum}
    </select>
 
</mapper>