TTableNum.xml 977 Bytes
Newer Older
Rensq's avatar
Rensq committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<?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.testor.ddd.functionConfiguration.infrastructure.repository.tableNum.dao.TTableNumDao">
    <!-- 开启二级缓存 -->
    <!-- <cache type="org.mybatis.caches.ehcache.LoggingEhcache"/> -->
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap"
               type="com.testor.ddd.functionConfiguration.infrastructure.repository.tableNum.entity.TTableNumDO">
        <id column="id" property="id"/>
        <id column="table_name" property="tableName"/>
        <id column="field_name" property="fieldName"/>
        <id column="num" property="num"/>
    </resultMap>

    <update id="replaceFieldName">
        update t_table_num
        set field_name = replace(field_name,#{oldFieldName}, #{newFieldName})
        where status = '0' and table_name = #{tableName}
    </update>
</mapper>