12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?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.miniapp.bus.mapper.BkLocationRecordMapper">
-
- <resultMap type="BkLocationRecord" id="BkLocationRecordResult">
- <result property="id" column="id" />
- <result property="processId" column="process_id" />
- <result property="lat" column="lat" />
- <result property="lon" column="lon" />
- <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="selectBkLocationRecordVo">
- select id, process_id, lat, lon, create_by, create_time, update_by, update_time from bk_location_record
- </sql>
- <select id="selectBkLocationRecordList" parameterType="BkLocationRecord" resultMap="BkLocationRecordResult">
- <include refid="selectBkLocationRecordVo"/>
- <where>
- <if test="processId != null "> and process_id = #{processId}</if>
- <if test="lat != null and lat != ''"> and lat = #{lat}</if>
- <if test="lon != null and lon != ''"> and lon = #{lon}</if>
- </where>
- ORDER BY create_time ASC
- </select>
-
- <select id="selectBkLocationRecordById" parameterType="Long" resultMap="BkLocationRecordResult">
- <include refid="selectBkLocationRecordVo"/>
- where id = #{id}
- </select>
- <insert id="insertBkLocationRecord" parameterType="BkLocationRecord">
- insert into bk_location_record
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="processId != null">process_id,</if>
- <if test="lat != null">lat,</if>
- <if test="lon != null">lon,</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="id != null">#{id},</if>
- <if test="processId != null">#{processId},</if>
- <if test="lat != null">#{lat},</if>
- <if test="lon != null">#{lon},</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="updateBkLocationRecord" parameterType="BkLocationRecord">
- update bk_location_record
- <trim prefix="SET" suffixOverrides=",">
- <if test="processId != null">process_id = #{processId},</if>
- <if test="lat != null">lat = #{lat},</if>
- <if test="lon != null">lon = #{lon},</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="deleteBkLocationRecordById" parameterType="Long">
- delete from bk_location_record where id = #{id}
- </delete>
- <delete id="deleteBkLocationRecordByIds" parameterType="String">
- delete from bk_location_record where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|