|
@@ -0,0 +1,106 @@
|
|
|
+<?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.ruoyi.qdtl.mapper.TlInspectionLineMapper">
|
|
|
+
|
|
|
+ <resultMap type="TlInspectionLine" id="TlInspectionLineResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="lineCode" column="line_code" />
|
|
|
+ <result property="lineName" column="line_name" />
|
|
|
+ <result property="detail" column="detail" />
|
|
|
+ <result property="areaId" column="area_id" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ <result property="photo" column="photo" />
|
|
|
+ <result property="voice" column="voice" />
|
|
|
+ <result property="video" column="video" />
|
|
|
+ <result property="annex" column="annex" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTlInspectionLineVo">
|
|
|
+ select id, line_code, line_name, detail, area_id, remark, photo, voice, video, annex, create_by, create_time, update_by, update_time from tl_inspection_line
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTlInspectionLineList" parameterType="TlInspectionLine" resultMap="TlInspectionLineResult">
|
|
|
+ <include refid="selectTlInspectionLineVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="lineCode != null and lineCode != ''"> and line_code like concat('%', #{lineCode}, '%')</if>
|
|
|
+ <if test="lineName != null and lineName != ''"> and line_name like concat('%', #{lineName}, '%')</if>
|
|
|
+ </where>
|
|
|
+ order by create_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTlInspectionLineById" parameterType="Long" resultMap="TlInspectionLineResult">
|
|
|
+ <include refid="selectTlInspectionLineVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTlInspectionLine" parameterType="TlInspectionLine" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into tl_inspection_line
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="lineCode != null and lineCode != ''">line_code,</if>
|
|
|
+ <if test="lineName != null and lineName != ''">line_name,</if>
|
|
|
+ <if test="detail != null">detail,</if>
|
|
|
+ <if test="areaId != null">area_id,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ <if test="photo != null">photo,</if>
|
|
|
+ <if test="voice != null">voice,</if>
|
|
|
+ <if test="video != null">video,</if>
|
|
|
+ <if test="annex != null">annex,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="lineCode != null and lineCode != ''">#{lineCode},</if>
|
|
|
+ <if test="lineName != null and lineName != ''">#{lineName},</if>
|
|
|
+ <if test="detail != null">#{detail},</if>
|
|
|
+ <if test="areaId != null">#{areaId},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ <if test="photo != null">#{photo},</if>
|
|
|
+ <if test="voice != null">#{voice},</if>
|
|
|
+ <if test="video != null">#{video},</if>
|
|
|
+ <if test="annex != null">#{annex},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTlInspectionLine" parameterType="TlInspectionLine">
|
|
|
+ update tl_inspection_line
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="lineCode != null and lineCode != ''">line_code = #{lineCode},</if>
|
|
|
+ <if test="lineName != null and lineName != ''">line_name = #{lineName},</if>
|
|
|
+ <if test="detail != null">detail = #{detail},</if>
|
|
|
+ <if test="areaId != null">area_id = #{areaId},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="photo != null">photo = #{photo},</if>
|
|
|
+ <if test="voice != null">voice = #{voice},</if>
|
|
|
+ <if test="video != null">video = #{video},</if>
|
|
|
+ <if test="annex != null">annex = #{annex},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteTlInspectionLineById" parameterType="Long">
|
|
|
+ delete from tl_inspection_line where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTlInspectionLineByIds" parameterType="String">
|
|
|
+ delete from tl_inspection_line where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|