MagicTemplateConfigMapper.xml
2.26 KB
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
<?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="cn.com.glsx.entmicro.mapper.MagicTemplateConfigMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.entity.magic.MagicTemplateConfig">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="merchant_id" jdbcType="INTEGER" property="merchantId"/>
<result column="table_name" jdbcType="VARCHAR" property="tableName"/>
<result column="excel_name" jdbcType="VARCHAR" property="excelName"/>
<result column="excel_url" jdbcType="INTEGER" property="excelUrl"/>
<result column="type" jdbcType="INTEGER" property="type"/>
<result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
<result column="created_by" jdbcType="INTEGER" property="createdBy"/>
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime"/>
<result column="updated_by" jdbcType="INTEGER" property="updatedBy"/>
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime"/>
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, merchant_id, `table_name`, excel_name, excel_url, `type`, del_flag, created_by, created_time,
updated_by, updated_time
</sql>
<insert id="insertMapList">
insert into ${tableName}(<foreach collection="conf" item="field" separator=",">${field.cloumnName}</foreach>)
values
<foreach collection="maps" separator="," item="mMap">
<foreach collection="mMap.entrySet()" index="key" item="val" open="(" separator="," close=")">
#{val}
</foreach>
</foreach>
</insert>
<insert id="insertCustomerList">
insert into ${tableName}(${sqlname})
values
<foreach collection="sqls" separator="," item="val">
(${val})
</foreach>
</insert>
<select id="findByMerchantIdAndType" resultMap="BaseResultMap">
select <include refid="Base_Column_List"/> from magic_template_config where merchant_id=#{merchantId} and type=#{type}
</select>
</mapper>