|
@@ -0,0 +1,151 @@
|
|
|
|
+<?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.system.mapper.ReservRecordMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="ReservRecord" id="ReservRecordResult">
|
|
|
|
+ <result property="reservRecordId" column="reserv_record_id" />
|
|
|
|
+ <result property="portalId" column="portal_id" />
|
|
|
|
+ <result property="houseAddress" column="house_address" />
|
|
|
|
+ <result property="detailAddress" column="detail_address" />
|
|
|
|
+ <result property="lgt" column="lgt" />
|
|
|
|
+ <result property="lat" column="lat" />
|
|
|
|
+ <result property="shareName" column="share_name" />
|
|
|
|
+ <result property="name" column="name" />
|
|
|
|
+ <result property="num" column="num" />
|
|
|
|
+ <result property="reason" column="reason" />
|
|
|
|
+ <result property="mobileNumber" column="mobile_number" />
|
|
|
|
+ <result property="isCar" column="is_car" />
|
|
|
|
+ <result property="plateNumber" column="plate_number" />
|
|
|
|
+ <result property="reserveTime" column="reserve_time" />
|
|
|
|
+ <result property="visitorTime" column="visitor_time" />
|
|
|
|
+ <result property="status" column="status" />
|
|
|
|
+ <result property="photo" column="photo" />
|
|
|
|
+ <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="selectReservRecordVo">
|
|
|
|
+ select reserv_record_id, portal_id, house_address, detail_address, lgt, lat, share_name, name, num, reason, mobile_number, is_car, plate_number, reserve_time, visitor_time, status, photo, create_by, create_time, update_by, update_time, remark from reserv_record
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="selectReservRecordList" parameterType="ReservRecord" resultMap="ReservRecordResult">
|
|
|
|
+ <include refid="selectReservRecordVo"/>
|
|
|
|
+ <where>
|
|
|
|
+ <if test="portalId != null "> and portal_id = #{portalId}</if>
|
|
|
|
+ <if test="houseAddress != null and houseAddress != ''"> and house_address = #{houseAddress}</if>
|
|
|
|
+ <if test="detailAddress != null and detailAddress != ''"> and detail_address = #{detailAddress}</if>
|
|
|
|
+ <if test="lgt != null and lgt != ''"> and lgt = #{lgt}</if>
|
|
|
|
+ <if test="lat != null and lat != ''"> and lat = #{lat}</if>
|
|
|
|
+ <if test="shareName != null and shareName != ''"> and share_name like concat('%', #{shareName}, '%')</if>
|
|
|
|
+ <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
|
+ <if test="num != null and num != ''"> and num = #{num}</if>
|
|
|
|
+ <if test="reason != null and reason != ''"> and reason = #{reason}</if>
|
|
|
|
+ <if test="mobileNumber != null and mobileNumber != ''"> and mobile_number = #{mobileNumber}</if>
|
|
|
|
+ <if test="isCar != null and isCar != ''"> and is_car = #{isCar}</if>
|
|
|
|
+ <if test="plateNumber != null and plateNumber != ''"> and plate_number = #{plateNumber}</if>
|
|
|
|
+ <if test="reserveTime != null "> and reserve_time = #{reserveTime}</if>
|
|
|
|
+ <if test="visitorTime != null "> and visitor_time = #{visitorTime}</if>
|
|
|
|
+ <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
|
+ <if test="photo != null and photo != ''"> and photo = #{photo}</if>
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectReservRecordByReservRecordId" parameterType="Long" resultMap="ReservRecordResult">
|
|
|
|
+ <include refid="selectReservRecordVo"/>
|
|
|
|
+ where reserv_record_id = #{reservRecordId}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <insert id="insertReservRecord" parameterType="ReservRecord" useGeneratedKeys="true" keyProperty="reservRecordId">
|
|
|
|
+ insert into reserv_record
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="portalId != null">portal_id,</if>
|
|
|
|
+ <if test="houseAddress != null and houseAddress != ''">house_address,</if>
|
|
|
|
+ <if test="detailAddress != null and detailAddress != ''">detail_address,</if>
|
|
|
|
+ <if test="lgt != null and lgt != ''">lgt,</if>
|
|
|
|
+ <if test="lat != null and lat != ''">lat,</if>
|
|
|
|
+ <if test="shareName != null">share_name,</if>
|
|
|
|
+ <if test="name != null">name,</if>
|
|
|
|
+ <if test="num != null">num,</if>
|
|
|
|
+ <if test="reason != null">reason,</if>
|
|
|
|
+ <if test="mobileNumber != null and mobileNumber != ''">mobile_number,</if>
|
|
|
|
+ <if test="isCar != null">is_car,</if>
|
|
|
|
+ <if test="plateNumber != null and plateNumber != ''">plate_number,</if>
|
|
|
|
+ <if test="reserveTime != null">reserve_time,</if>
|
|
|
|
+ <if test="visitorTime != null">visitor_time,</if>
|
|
|
|
+ <if test="status != null">status,</if>
|
|
|
|
+ <if test="photo != null">photo,</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="portalId != null">#{portalId},</if>
|
|
|
|
+ <if test="houseAddress != null and houseAddress != ''">#{houseAddress},</if>
|
|
|
|
+ <if test="detailAddress != null and detailAddress != ''">#{detailAddress},</if>
|
|
|
|
+ <if test="lgt != null and lgt != ''">#{lgt},</if>
|
|
|
|
+ <if test="lat != null and lat != ''">#{lat},</if>
|
|
|
|
+ <if test="shareName != null">#{shareName},</if>
|
|
|
|
+ <if test="name != null">#{name},</if>
|
|
|
|
+ <if test="num != null">#{num},</if>
|
|
|
|
+ <if test="reason != null">#{reason},</if>
|
|
|
|
+ <if test="mobileNumber != null and mobileNumber != ''">#{mobileNumber},</if>
|
|
|
|
+ <if test="isCar != null">#{isCar},</if>
|
|
|
|
+ <if test="plateNumber != null and plateNumber != ''">#{plateNumber},</if>
|
|
|
|
+ <if test="reserveTime != null">#{reserveTime},</if>
|
|
|
|
+ <if test="visitorTime != null">#{visitorTime},</if>
|
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
|
+ <if test="photo != null">#{photo},</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="updateReservRecord" parameterType="ReservRecord">
|
|
|
|
+ update reserv_record
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="portalId != null">portal_id = #{portalId},</if>
|
|
|
|
+ <if test="houseAddress != null and houseAddress != ''">house_address = #{houseAddress},</if>
|
|
|
|
+ <if test="detailAddress != null and detailAddress != ''">detail_address = #{detailAddress},</if>
|
|
|
|
+ <if test="lgt != null and lgt != ''">lgt = #{lgt},</if>
|
|
|
|
+ <if test="lat != null and lat != ''">lat = #{lat},</if>
|
|
|
|
+ <if test="shareName != null">share_name = #{shareName},</if>
|
|
|
|
+ <if test="name != null">name = #{name},</if>
|
|
|
|
+ <if test="num != null">num = #{num},</if>
|
|
|
|
+ <if test="reason != null">reason = #{reason},</if>
|
|
|
|
+ <if test="mobileNumber != null and mobileNumber != ''">mobile_number = #{mobileNumber},</if>
|
|
|
|
+ <if test="isCar != null">is_car = #{isCar},</if>
|
|
|
|
+ <if test="plateNumber != null and plateNumber != ''">plate_number = #{plateNumber},</if>
|
|
|
|
+ <if test="reserveTime != null">reserve_time = #{reserveTime},</if>
|
|
|
|
+ <if test="visitorTime != null">visitor_time = #{visitorTime},</if>
|
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
|
+ <if test="photo != null">photo = #{photo},</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 reserv_record_id = #{reservRecordId}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteReservRecordByReservRecordId" parameterType="Long">
|
|
|
|
+ delete from reserv_record where reserv_record_id = #{reservRecordId}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteReservRecordByReservRecordIds" parameterType="String">
|
|
|
|
+ delete from reserv_record where reserv_record_id in
|
|
|
|
+ <foreach item="reservRecordId" collection="array" open="(" separator="," close=")">
|
|
|
|
+ #{reservRecordId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+</mapper>
|