|
@@ -0,0 +1,115 @@
|
|
|
|
+<?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.sooka.sponest.data.housingconstruction.mapper.CenterdataTHousingconstructionAttachMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="CenterdataTHousingconstructionAttach" id="CenterdataTHousingconstructionAttachResult">
|
|
|
|
+ <result property="id" column="id" />
|
|
|
|
+ <result property="busId" column="bus_id" />
|
|
|
|
+ <result property="dictType" column="dict_type" />
|
|
|
|
+ <result property="dictValue" column="dict_value" />
|
|
|
|
+ <result property="attachPath" column="attach_path" />
|
|
|
|
+ <result property="fileName" column="file_name" />
|
|
|
|
+ <result property="attachSorts" column="attach_sorts" />
|
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
|
+ <result property="createName" column="create_name" />
|
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
|
+ <result property="updateName" column="update_name" />
|
|
|
|
+ <result property="deptId" column="dept_id" />
|
|
|
|
+ <result property="deptName" column="dept_name" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <sql id="selectCenterdataTHousingconstructionAttachVo">
|
|
|
|
+ select id, bus_id, dict_type, dict_value, attach_path, file_name, attach_sorts, create_time, create_by, create_name, update_time, update_by, update_name, dept_id, dept_name from centerdata_t_housingconstruction_attach
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="selectCenterdataTHousingconstructionAttachList" parameterType="CenterdataTHousingconstructionAttach" resultMap="CenterdataTHousingconstructionAttachResult">
|
|
|
|
+ <include refid="selectCenterdataTHousingconstructionAttachVo"/>
|
|
|
|
+ <where>
|
|
|
|
+ <if test="busId != null and busId != ''"> and bus_id = #{busId}</if>
|
|
|
|
+ <if test="dictType != null and dictType != ''"> and dict_type = #{dictType}</if>
|
|
|
|
+ <if test="dictValue != null and dictValue != ''"> and dict_value = #{dictValue}</if>
|
|
|
|
+ <if test="attachPath != null and attachPath != ''"> and attach_path = #{attachPath}</if>
|
|
|
|
+ <if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
|
|
|
|
+ <if test="attachSorts != null "> and attach_sorts = #{attachSorts}</if>
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectCenterdataTHousingconstructionAttachById" parameterType="Long" resultMap="CenterdataTHousingconstructionAttachResult">
|
|
|
|
+ <include refid="selectCenterdataTHousingconstructionAttachVo"/>
|
|
|
|
+ where id = #{id}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <insert id="insertCenterdataTHousingconstructionAttach" parameterType="CenterdataTHousingconstructionAttach">
|
|
|
|
+ insert into centerdata_t_housingconstruction_attach
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="id != null">id,</if>
|
|
|
|
+ <if test="busId != null">bus_id,</if>
|
|
|
|
+ <if test="dictType != null">dict_type,</if>
|
|
|
|
+ <if test="dictValue != null">dict_value,</if>
|
|
|
|
+ <if test="attachPath != null">attach_path,</if>
|
|
|
|
+ <if test="fileName != null">file_name,</if>
|
|
|
|
+ <if test="attachSorts != null">attach_sorts,</if>
|
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
|
+ <if test="createName != null">create_name,</if>
|
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
|
+ <if test="updateName != null">update_name,</if>
|
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
|
+ <if test="deptName != null">dept_name,</if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
|
+ <if test="busId != null">#{busId},</if>
|
|
|
|
+ <if test="dictType != null">#{dictType},</if>
|
|
|
|
+ <if test="dictValue != null">#{dictValue},</if>
|
|
|
|
+ <if test="attachPath != null">#{attachPath},</if>
|
|
|
|
+ <if test="fileName != null">#{fileName},</if>
|
|
|
|
+ <if test="attachSorts != null">#{attachSorts},</if>
|
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
|
+ <if test="createName != null">#{createName},</if>
|
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
|
+ <if test="updateName != null">#{updateName},</if>
|
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
|
+ <if test="deptName != null">#{deptName},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="updateCenterdataTHousingconstructionAttach" parameterType="CenterdataTHousingconstructionAttach">
|
|
|
|
+ update centerdata_t_housingconstruction_attach
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="busId != null">bus_id = #{busId},</if>
|
|
|
|
+ <if test="dictType != null">dict_type = #{dictType},</if>
|
|
|
|
+ <if test="dictValue != null">dict_value = #{dictValue},</if>
|
|
|
|
+ <if test="attachPath != null">attach_path = #{attachPath},</if>
|
|
|
|
+ <if test="fileName != null">file_name = #{fileName},</if>
|
|
|
|
+ <if test="attachSorts != null">attach_sorts = #{attachSorts},</if>
|
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
+ <if test="createName != null">create_name = #{createName},</if>
|
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
+ <if test="updateName != null">update_name = #{updateName},</if>
|
|
|
|
+ <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
|
+ <if test="deptName != null">dept_name = #{deptName},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ where id = #{id}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteCenterdataTHousingconstructionAttachById" parameterType="Long">
|
|
|
|
+ delete from centerdata_t_housingconstruction_attach where id = #{id}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteCenterdataTHousingconstructionAttachByIds" parameterType="String">
|
|
|
|
+ delete from centerdata_t_housingconstruction_attach where id in
|
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+</mapper>
|