<?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.app.patrolplan.mapper.ArdAppPatrolpointRecordMapper">
|
|
<resultMap type="ArdAppPatrolpointRecord" id="ArdAppPatrolpointRecordResult">
|
<result property="id" column="id" />
|
<result property="remark" column="remark" />
|
<result property="longitude" column="longitude" />
|
<result property="latitude" column="latitude" />
|
<result property="userId" column="user_id" />
|
<result property="recordTime" column="record_time" />
|
<result property="appPatrolpointsId" column="app_patrolpoints_id" />
|
</resultMap>
|
|
<sql id="selectArdAppPatrolpointRecordVo">
|
select id, remark, longitude, latitude, user_id, record_time, app_patrolpoints_id from ard_app_patrolpoint_record
|
</sql>
|
|
<select id="selectArdAppPatrolpointRecordList" parameterType="ArdAppPatrolpointRecord" resultMap="ArdAppPatrolpointRecordResult">
|
<include refid="selectArdAppPatrolpointRecordVo"/>
|
<where>
|
<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 userId != ''"> and user_id = #{userId}</if>
|
<if test="recordTime != null and recordTime != ''"> and record_time = #{recordTime}</if>
|
<if test="appPatrolpointsId != null and appPatrolpointsId != ''"> and app_patrolpoints_id = #{appPatrolpointsId}</if>
|
</where>
|
</select>
|
|
<select id="selectArdAppPatrolpointRecordById" parameterType="String" resultMap="ArdAppPatrolpointRecordResult">
|
<include refid="selectArdAppPatrolpointRecordVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertArdAppPatrolpointRecord" parameterType="ArdAppPatrolpointRecord">
|
insert into ard_app_patrolpoint_record
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="remark != null">remark,</if>
|
<if test="longitude != null">longitude,</if>
|
<if test="latitude != null">latitude,</if>
|
<if test="userId != null">user_id,</if>
|
<if test="recordTime != null">record_time,</if>
|
<if test="appPatrolpointsId != null">app_patrolpoints_id,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="remark != null">#{remark},</if>
|
<if test="longitude != null">#{longitude},</if>
|
<if test="latitude != null">#{latitude},</if>
|
<if test="userId != null">#{userId},</if>
|
<if test="recordTime != null">#{recordTime},</if>
|
<if test="appPatrolpointsId != null">#{appPatrolpointsId},</if>
|
</trim>
|
</insert>
|
|
<update id="updateArdAppPatrolpointRecord" parameterType="ArdAppPatrolpointRecord">
|
update ard_app_patrolpoint_record
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="remark != null">remark = #{remark},</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="recordTime != null">record_time = #{recordTime},</if>
|
<if test="appPatrolpointsId != null">app_patrolpoints_id = #{appPatrolpointsId},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteArdAppPatrolpointRecordById" parameterType="String">
|
delete from ard_app_patrolpoint_record where id = #{id}
|
</delete>
|
|
<delete id="deleteArdAppPatrolpointRecordByIds" parameterType="String">
|
delete from ard_app_patrolpoint_record where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
<!-- <select id="maxNum">-->
|
<!-- select user_id,user_name,max(points_num) pointsNum from ard_app_patrolpoint_record GROUP BY user_id,user_name-->
|
<!-- </select>-->
|
|
|
</mapper>
|