| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <?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.jjt.biz.mapper.BizInspectionMapper">
- <resultMap type="BizInspection" id="BizInspectionResult">
- <result property="inspectionId" column="INSPECTION_ID"/>
- <result property="modelId" column="MODEL_ID"/>
- <result property="inspectionTime" column="INSPECTION_TIME"/>
- <result property="modelScore" column="MODEL_SCORE"/>
- <result property="createBy" column="CREATE_BY"/>
- <result property="createTime" column="CREATE_TIME"/>
- <result property="updateBy" column="UPDATE_BY"/>
- <result property="updateTime" column="UPDATE_TIME"/>
- <result property="remark" column="REMARK"/>
- </resultMap>
- <sql id="selectBizInspectionVo">
- select INSPECTION_ID, MODEL_ID, INSPECTION_TIME, MODEL_SCORE, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK
- from biz_inspection
- </sql>
- <select id="selectBizInspectionList" parameterType="BizInspection" resultMap="BizInspectionResult">
- <include refid="selectBizInspectionVo"/>
- <where>
- <if test="modelId != null ">
- and MODEL_ID = #{modelId}
- </if>
- <if test="inspectionTime != null ">
- and INSPECTION_TIME = #{inspectionTime}
- </if>
- <if test="modelScore != null ">
- and MODEL_SCORE = #{modelScore}
- </if>
- <if test="createBy != null and createBy != ''">
- and CREATE_BY = #{createBy}
- </if>
- <if test="createTime != null ">
- and CREATE_TIME = #{createTime}
- </if>
- <if test="updateBy != null and updateBy != ''">
- and UPDATE_BY = #{updateBy}
- </if>
- <if test="updateTime != null ">
- and UPDATE_TIME = #{updateTime}
- </if>
- <if test="remark != null and remark != ''">
- and REMARK = #{remark}
- </if>
- </where>
- </select>
- <select id="selectBizInspectionByInspectionId" parameterType="Long"
- resultMap="BizInspectionResult">
- <include refid="selectBizInspectionVo"/>
- where INSPECTION_ID = #{inspectionId}
- </select>
- <insert id="insertBizInspection" parameterType="BizInspection" useGeneratedKeys="true"
- keyProperty="inspectionId">
- insert into biz_inspection
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="modelId != null">MODEL_ID,
- </if>
- <if test="inspectionTime != null">INSPECTION_TIME,
- </if>
- <if test="modelScore != null">MODEL_SCORE,
- </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>
- <if test="remark != null">REMARK,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="modelId != null">#{modelId},
- </if>
- <if test="inspectionTime != null">#{inspectionTime},
- </if>
- <if test="modelScore != null">#{modelScore},
- </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>
- <if test="remark != null">#{remark},
- </if>
- </trim>
- </insert>
- <update id="updateBizInspection" parameterType="BizInspection">
- update biz_inspection
- <trim prefix="SET" suffixOverrides=",">
- <if test="modelId != null">MODEL_ID =
- #{modelId},
- </if>
- <if test="inspectionTime != null">INSPECTION_TIME =
- #{inspectionTime},
- </if>
- <if test="modelScore != null">MODEL_SCORE =
- #{modelScore},
- </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>
- <if test="remark != null">REMARK =
- #{remark},
- </if>
- </trim>
- where INSPECTION_ID = #{inspectionId}
- </update>
- <delete id="deleteBizInspectionByInspectionId" parameterType="Long">
- delete
- from biz_inspection where INSPECTION_ID = #{inspectionId}
- </delete>
- <delete id="deleteBizInspectionByInspectionIds" parameterType="String">
- delete from biz_inspection where INSPECTION_ID in
- <foreach item="inspectionId" collection="array" open="(" separator="," close=")">
- #{inspectionId}
- </foreach>
- </delete>
- </mapper>
|