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
50
51
<?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.changhong.epc.tenant.mapper.tenant.system.EpcShowColumnMapper">
    <resultMap type="com.changhong.epc.bean.tenant.system.EpcShowColumn" id="epcShowColumnRes">
        <id property="id" column="id"/>
        <result property="formId" column="formId"/>
        <result property="dataStatus" column="data_status"/>
        <result property="personId" column="personId"/>
        <result property="text" column="text"/>
        <result property="insP" column="ins_p"/>
        <result property="insT" column="ins_t"/>
        <result property="updP" column="upd_p"/>
        <result property="updT" column="upd_t"/>
    </resultMap>
 
 
    <sql id="epcShowColumnMapper">
        id,data_status,formId,personId,text,ins_p,ins_t,upd_p,upd_t
    </sql>
 
 
    <update id="insertShowColumn">
      insert
       epc_form_show_column_{rule}
       (formId,text,data_status,personId,ins_p,ins_t,upd_p,upd_t)
      values(#{epc.formId},#{epc.text},#{epc.dataStatus},#{openId},#{epc.insP},#{epc.insT},#{epc.updP},#{epc.updT})
    </update>
 
    <!--insert-->
    <!--epc_form_show_column_100000001_7-->
    <!--(formId,text,data_status,personId,ins_p,ins_t,upd_p,upd_t)-->
    <!--values(123,'name:123',true,123,'guoqy',20191213,'guoqy',20191213);-->
    <select id="selectShowColumnById" resultMap="epcShowColumnRes">
        select
        <include refid="epcShowColumnMapper"/>
        from epc_form_show_column_{rule}
        where formId = #{epc.formId} and personId = #{openId}
    </select>
 
    <delete id="deleteShowColumnById">
       delete from epc_form_show_column_{rule}
        where formId = #{epc.formId} and personId = #{openId}
    </delete>
 
    <update id="updateShowColumnById">
         insert
       epc_form_show_column_{rule}
       (formId,text,data_status,personId,ins_p,ins_t,upd_p,upd_t)
      values(#{epc.formId},#{epc.text},#{epc.dataStatus},#{openId},#{epc.insP},#{epc.insT},#{epc.updP},#{epc.updT})
    </update>
</mapper>