123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <?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.business.slfh.manager.inspectionmanager.mapper.TUInspectionMapper">
-
- <resultMap type="TUInspection" id="TUInspectionResult">
- <result property="id" column="id" />
- <result property="status" column="status" />
- <result property="remark" column="remark" />
- <result property="delFlag" column="del_flag" />
- <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="inspectionType" column="inspection_type" />
- <result property="recordTime" column="record_time" />
- <result property="longitude" column="longitude" />
- <result property="latitude" column="latitude" />
- <result property="userId" column="user_id" />
- <result property="userName" column="user_name" />
- </resultMap>
- <sql id="selectTUInspectionVo">
- select id, status, remark, del_flag, create_by, create_time, update_by, update_time, inspection_type, record_time, longitude, latitude, user_id, user_name from t_u_inspection
- </sql>
- <select id="selectTUInspectionList" parameterType="TUInspection" resultMap="TUInspectionResult">
- <include refid="selectTUInspectionVo"/>
- <where>
- <if test="status != null and status != ''"> and status = #{status}</if>
- <if test="inspectionType != null and inspectionType != ''"> and inspection_type = #{inspectionType}</if>
- <if test="recordTime != null "> and record_time = #{recordTime}</if>
- <if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
- <if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
- <if test="userId != null "> and user_id = #{userId}</if>
- <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
- </where>
- </select>
-
- <select id="selectTUInspectionById" parameterType="String" resultMap="TUInspectionResult">
- <include refid="selectTUInspectionVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertTUInspection" parameterType="TUInspection">
- insert into t_u_inspection
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="status != null">status,</if>
- <if test="remark != null">remark,</if>
- <if test="delFlag != null">del_flag,</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="inspectionType != null">inspection_type,</if>
- <if test="recordTime != null">record_time,</if>
- <if test="longitude != null">longitude,</if>
- <if test="latitude != null">latitude,</if>
- <if test="userId != null">user_id,</if>
- <if test="userName != null">user_name,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="status != null">#{status},</if>
- <if test="remark != null">#{remark},</if>
- <if test="delFlag != null">#{delFlag},</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="inspectionType != null">#{inspectionType},</if>
- <if test="recordTime != null">#{recordTime},</if>
- <if test="longitude != null">#{longitude},</if>
- <if test="latitude != null">#{latitude},</if>
- <if test="userId != null">#{userId},</if>
- <if test="userName != null">#{userName},</if>
- </trim>
- </insert>
- <update id="updateTUInspection" parameterType="TUInspection">
- update t_u_inspection
- <trim prefix="SET" suffixOverrides=",">
- <if test="status != null">status = #{status},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</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="inspectionType != null">inspection_type = #{inspectionType},</if>
- <if test="recordTime != null">record_time = #{recordTime},</if>
- <if test="longitude != null">longitude = #{longitude},</if>
- <if test="latitude != null">latitude = #{latitude},</if>
- <if test="userId != null">user_id = #{userId},</if>
- <if test="userName != null">user_name = #{userName},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteTUInspectionById" parameterType="String">
- delete from t_u_inspection where id = #{id}
- </delete>
- <delete id="deleteTUInspectionByIds" parameterType="String">
- delete from t_u_inspection where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|