zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
commit | author | age
a18bfa 1 <?xml version="1.0" encoding="UTF-8" ?>
Z 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3 <mapper namespace="com.changhong.epc.admin.mapper.centen.corres.CorresElFieldMapper">
4     <resultMap type="com.changhong.epc.bean.admin.CorresElField" id="findCorresMap">
5         <id property="id" column="id"/>
6         <result property="elIden" column="el_iden"/>
7         <result property="elIdenName" column="el_iden_name"/>
8         <result property="businessMeaningCode" column="business_meaning_code"/>
9         <result property="mdCode" column="md_code"/>
10         <result property="mappingIden" column="mapping_iden"/>
11     </resultMap>
12         
13     <update id="deleteCorres" parameterType="com.changhong.epc.bean.admin.CorresElField">
14         update 
15             epc_corres_el_field
16         set 
17             data_start = 99 
18         where id = #{corr.id}
19     </update>
20     
21     <!-- <select id="getMdCode" resultType="java.lang.String">
22         SELECT
23             md_code
24         FROM
25             epc_corres_el_field
26         WHERE
27             business_meaning_code = #{bmcode}
28         AND
29             data_start ='0'
30     </select> -->
31     
32     <select id="getCorresElField" resultType="com.changhong.epc.bean.admin.CorresElField">
33         SELECT
34             id,
35             el_iden elIden,
36             el_iden_name elIdenName,
37             business_meaning_code businessMeaningCode,
38             md_code mdCode,
39             mapping_iden mappingIden,
40             ins_p insP,
41             ins_t insT,
42             upd_p updP,
43             upd_t updT,
44             data_start dataStart
45         FROM
46             epc_corres_el_field
47         WHERE
48             data_start ='0'
49             <if test="corr.id != null and corr.id !=''">
50         AND
51             id = #{corr.id}
52             </if>
53             <if test="corr.elIden != null and corr.elIden !=''">
54         AND
55             el_iden = #{corr.elIden}
56             </if>
57             <if test="corr.elIdenName != null and corr.elIdenName !=''">
58         AND
59             el_iden_name = #{corr.elIdenName}
60             </if>
61             <if test="corr.businessMeaningCode != null and corr.businessMeaningCode !=''">
62         AND
63             business_meaning_code = #{corr.businessMeaningCode}
64             </if>
65             <if test="corr.mdCode != null and corr.mdCode !=''">
66         AND
67             md_code = #{corr.mdCode}
68             </if>
69             <if test="corr.mappingIden != null and corr.mappingIden !=''">
70         AND
71             mapping_iden = #{corr.mappingIden}
72             </if>
73     </select>
74
75     <select id="getCodeByMeaning" resultType="java.lang.String">
76         select
77           md_code
78         from
79           epc_corres_el_field
80         where
81           business_meaning_code=#{flag}
82     </select>
83 </mapper>