kimi
2020-03-31 74472c9d22dddcb41383794caf0011043b20f817
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
<?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.highdatas.mdm.mapper.MaintainFieldMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.highdatas.mdm.entity.MaintainField">
        <id column="id" property="id" />
        <result column="table_name" property="tableName" />
        <result column="flow_id" property="flowId" />
        <result column="charge_id" property="chargeId" />
        <result column="desp" property="desp" />
        <result column="version" property="version" />
        <result column="create_time" property="createTime" />
        <result column="order_no" property="orderNo" />
    </resultMap>
 
    <select id="getMappedMatintainId" resultType="java.util.Map" statementType="STATEMENT" >
        <![CDATA[
            SELECT  f.* from maintain_field f
            LEFT JOIN maintain  m on f.maintain_id =  m.id
            WHERE m.order_no < ${orderNo} and m.table_name = ${tableName} ORDER BY m.order_no desc limit 1
        ]]>
    </select>
 
 
    <select id="addCloumn" resultType="java.lang.String" statementType="STATEMENT" >
        alter table ${tableName} add ${field} ${fieldType} null
    </select>
</mapper>