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
<?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_master_default_mapping -->
<mapper namespace="com.changhong.epc.admin.mapper.centen.site.CenterMasterValueMapper">
    
    <resultMap type="com.changhong.epc.bean.tenant.master.MasterValue" id="ValueResultMap">
        <result property="eleValue" column="ELE_VALUE"/>
        <result property="rowNo" column="ROW_NO"/>
    </resultMap>
    
    <resultMap id="MasterElementMap" type="com.changhong.epc.bean.tenant.master.extend.MasterElementExtend" >
           <result column="CODE" property="code"/>
           <result column="ALIAS" property="alias"/>
   </resultMap>
      
    <resultMap type="com.changhong.epc.bean.tenant.master.extend.MasterValueListExtend" id="masterValueMap">
        <id column="DEFINE_CODE" property="mdCode"/>
           <collection property="values" ofType="java.util.Map" javaType="com.changhong.epc.bean.tenant.master.MasterValueList">
               <id column="ID" property="id"/>
               <result column="ELE_CODE" property="eleCode"/>
               <result column="ELE_VALUE" property="eleValue"/>                
               <result column="ROW_NO" property="rowNo"/>
        </collection>
      </resultMap>
      
        <update id="updateStart" >
              update epc_master_value_{rule}
              set 
                  data_start = 99
                ,upd_p = -1
                ,upd_t = now()
              where 
            define_code = #{mdCode}
            and row_no 
            <foreach collection="list" item="data" open="IN (" close=")" separator=",">
                #{data.rowNum}
            </foreach>
      </update>
      
      <delete id="deleteValue">
          delete from epc_master_value_{rule}
          where define_code = #{config.masDataDefCode}
        and row_no = #{config.rowNum}
      </delete>
    
</mapper>