|
@@ -0,0 +1,102 @@
|
|
|
+<?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.onemap.system.mapper.TTableFiledMapper">
|
|
|
+
|
|
|
+ <resultMap type="TTableFiled" id="TTableFiledResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="filedName" column="filed_name" />
|
|
|
+ <result property="filedZh" column="filed_zh" />
|
|
|
+ <result property="filedDescribe" column="filed_describe" />
|
|
|
+ <result property="filedType" column="filed_type" />
|
|
|
+ <result property="filedTypeLen" column="filed_type_len" />
|
|
|
+ <result property="filedDict" column="filed_dict" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="deleteTime" column="delete_time" />
|
|
|
+ <result property="createUserId" column="create_user_id" />
|
|
|
+ <result property="deleteUserId" column="delete_user_id" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTTableFiledVo">
|
|
|
+ select id, filed_name, filed_zh, filed_describe, filed_type, filed_type_len, filed_dict, create_time, delete_time, create_user_id, delete_user_id from t_table_filed
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTTableFiledList" parameterType="TTableFiled" resultMap="TTableFiledResult">
|
|
|
+ <include refid="selectTTableFiledVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="filedName != null and filedName != ''"> and filed_name like concat('%', #{filedName}, '%')</if>
|
|
|
+ <if test="filedZh != null and filedZh != ''"> and filed_zh = #{filedZh}</if>
|
|
|
+ <if test="filedDescribe != null and filedDescribe != ''"> and filed_describe = #{filedDescribe}</if>
|
|
|
+ <if test="filedType != null and filedType != ''"> and filed_type = #{filedType}</if>
|
|
|
+ <if test="filedTypeLen != null and filedTypeLen != ''"> and filed_type_len = #{filedTypeLen}</if>
|
|
|
+ <if test="filedDict != null and filedDict != ''"> and filed_dict = #{filedDict}</if>
|
|
|
+ <if test="deleteTime != null "> and delete_time = #{deleteTime}</if>
|
|
|
+ <if test="createUserId != null and createUserId != ''"> and create_user_id = #{createUserId}</if>
|
|
|
+ <if test="deleteUserId != null and deleteUserId != ''"> and delete_user_id = #{deleteUserId}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTTableFiledById" parameterType="String" resultMap="TTableFiledResult">
|
|
|
+ <include refid="selectTTableFiledVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTTableFiled" parameterType="TTableFiled">
|
|
|
+ insert into t_table_filed
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="filedName != null and filedName != ''">filed_name,</if>
|
|
|
+ <if test="filedZh != null and filedZh != ''">filed_zh,</if>
|
|
|
+ <if test="filedDescribe != null">filed_describe,</if>
|
|
|
+ <if test="filedType != null and filedType != ''">filed_type,</if>
|
|
|
+ <if test="filedTypeLen != null">filed_type_len,</if>
|
|
|
+ <if test="filedDict != null">filed_dict,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="deleteTime != null">delete_time,</if>
|
|
|
+ <if test="createUserId != null and createUserId != ''">create_user_id,</if>
|
|
|
+ <if test="deleteUserId != null">delete_user_id,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="filedName != null and filedName != ''">#{filedName},</if>
|
|
|
+ <if test="filedZh != null and filedZh != ''">#{filedZh},</if>
|
|
|
+ <if test="filedDescribe != null">#{filedDescribe},</if>
|
|
|
+ <if test="filedType != null and filedType != ''">#{filedType},</if>
|
|
|
+ <if test="filedTypeLen != null">#{filedTypeLen},</if>
|
|
|
+ <if test="filedDict != null">#{filedDict},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="deleteTime != null">#{deleteTime},</if>
|
|
|
+ <if test="createUserId != null and createUserId != ''">#{createUserId},</if>
|
|
|
+ <if test="deleteUserId != null">#{deleteUserId},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTTableFiled" parameterType="TTableFiled">
|
|
|
+ update t_table_filed
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="filedName != null and filedName != ''">filed_name = #{filedName},</if>
|
|
|
+ <if test="filedZh != null and filedZh != ''">filed_zh = #{filedZh},</if>
|
|
|
+ <if test="filedDescribe != null">filed_describe = #{filedDescribe},</if>
|
|
|
+ <if test="filedType != null and filedType != ''">filed_type = #{filedType},</if>
|
|
|
+ <if test="filedTypeLen != null">filed_type_len = #{filedTypeLen},</if>
|
|
|
+ <if test="filedDict != null">filed_dict = #{filedDict},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="deleteTime != null">delete_time = #{deleteTime},</if>
|
|
|
+ <if test="createUserId != null and createUserId != ''">create_user_id = #{createUserId},</if>
|
|
|
+ <if test="deleteUserId != null">delete_user_id = #{deleteUserId},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteTTableFiledById" parameterType="String">
|
|
|
+ delete from t_table_filed where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTTableFiledByIds" parameterType="String">
|
|
|
+ delete from t_table_filed where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|