|
@@ -0,0 +1,75 @@
|
|
|
+<?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.apply.mapper.zymlapplication.TZymlFiledMapper">
|
|
|
+
|
|
|
+ <resultMap type="TZymlFiled" id="TZymlFiledResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="zymlId" column="zyml_id" />
|
|
|
+ <result property="filedName" column="filed_name" />
|
|
|
+ <result property="filedNameZh" column="filed_name_zh" />
|
|
|
+ <result property="shareDisplay" column="share_display" />
|
|
|
+ <result property="sort" column="sort" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTZymlFiledVo">
|
|
|
+ select id, zyml_id, filed_name, filed_name_zh, share_display, sort from t_zyml_filed
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTZymlFiledList" parameterType="TZymlFiled" resultMap="TZymlFiledResult">
|
|
|
+ <include refid="selectTZymlFiledVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="zymlId != null and zymlId != ''"> and zyml_id = #{zymlId}</if>
|
|
|
+ <if test="filedName != null and filedName != ''"> and filed_name like concat('%', #{filedName}, '%')</if>
|
|
|
+ <if test="filedNameZh != null and filedNameZh != ''"> and filed_name_zh like concat('%', #{filedNameZh}, '%')</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTZymlFiledById" parameterType="String" resultMap="TZymlFiledResult">
|
|
|
+ <include refid="selectTZymlFiledVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTZymlFiled" parameterType="TZymlFiled">
|
|
|
+ insert into t_zyml_filed
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="zymlId != null">zyml_id,</if>
|
|
|
+ <if test="filedName != null">filed_name,</if>
|
|
|
+ <if test="filedNameZh != null">filed_name_zh,</if>
|
|
|
+ <if test="shareDisplay != null">share_display,</if>
|
|
|
+ <if test="sort != sort">sort,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="zymlId != null">#{zymlId},</if>
|
|
|
+ <if test="filedName != null">#{filedName},</if>
|
|
|
+ <if test="filedNameZh != null">#{filedNameZh},</if>
|
|
|
+ <if test="shareDisplay != null">#{shareDisplay},</if>
|
|
|
+ <if test="sort != null">#{sort},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTZymlFiled" parameterType="TZymlFiled">
|
|
|
+ update t_zyml_filed
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="filedName != null">filed_name = #{filedName},</if>
|
|
|
+ <if test="filedNameZh != null">filed_name_zh = #{filedNameZh},</if>
|
|
|
+ <if test="shareDisplay != null">share_display = #{shareDisplay},</if>
|
|
|
+ <if test="sort != null">sort = #{sort},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteTZymlFiledById" parameterType="String">
|
|
|
+ delete from t_zyml_filed where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTZymlFiledByIds" parameterType="String">
|
|
|
+ delete from t_zyml_filed where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|