<?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.jcdm.main.da.tileMatchCollection.mapper.DaTileMatchCollectionMapper">
|
|
<resultMap type="DaTileMatchCollection" id="DaTileMatchCollectionResult">
|
<result property="id" column="id" />
|
<result property="sfcCode" column="sfc_code" />
|
<result property="paramCode" column="param_code" />
|
<result property="paramName" column="param_name" />
|
<result property="createTime" column="create_time" />
|
<result property="remarks" column="remarks" />
|
<result property="locationCode" column="location_code" />
|
</resultMap>
|
|
<sql id="selectDaTileMatchCollectionVo">
|
select id, sfc_code, param_code, param_name, create_time, remarks, location_code,param_value from da_tile_match_collection
|
</sql>
|
|
<select id="selectDaTileMatchCollectionList" parameterType="DaTileMatchCollection" resultMap="DaTileMatchCollectionResult">
|
<include refid="selectDaTileMatchCollectionVo"/>
|
<where>
|
<if test="sfcCode != null and sfcCode != ''"> and sfc_code = #{sfcCode}</if>
|
<if test="paramCode != null and paramCode != ''"> and param_code = #{paramCode}</if>
|
<if test="paramValue != null and paramValue != ''"> and param_value = #{paramValue}</if>
|
<if test="paramName != null and paramName != ''"> and param_name like concat('%', #{paramValue}, '%')</if>
|
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
|
</where>
|
</select>
|
|
<select id="selectDaTileMatchCollectionById" parameterType="Long" resultMap="DaTileMatchCollectionResult">
|
<include refid="selectDaTileMatchCollectionVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertDaTileMatchCollection" parameterType="DaTileMatchCollection">
|
insert into da_tile_match_collection
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="sfcCode != null">sfc_code,</if>
|
<if test="paramCode != null">param_code,</if>
|
<if test="paramName != null">param_name,</if>
|
<if test="paramValue != null">param_value,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="remarks != null">remarks,</if>
|
<if test="locationCode != null">location_code,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="sfcCode != null">#{sfcCode},</if>
|
<if test="paramCode != null">#{paramCode},</if>
|
<if test="paramName != null">#{paramName},</if>
|
<if test="paramValue != null">#{paramValue},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="remarks != null">#{remarks},</if>
|
<if test="locationCode != null">#{locationCode},</if>
|
</trim>
|
</insert>
|
|
<update id="updateDaTileMatchCollection" parameterType="DaTileMatchCollection">
|
update da_tile_match_collection
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="sfcCode != null">sfc_code = #{sfcCode},</if>
|
<if test="paramCode != null">param_code = #{paramCode},</if>
|
<if test="paramName != null">param_name = #{paramName},</if>
|
<if test="paramValue != null">param_value = #{paramValue},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="remarks != null">remarks = #{remarks},</if>
|
<if test="locationCode != null">location_code = #{locationCode},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteDaTileMatchCollectionById" parameterType="Long">
|
delete from da_tile_match_collection where id = #{id}
|
</delete>
|
|
<delete id="deleteDaTileMatchCollectionByIds" parameterType="String">
|
delete from da_tile_match_collection where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|