795 lines
31 KiB
XML
795 lines
31 KiB
XML
<?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.zhwl.hotel.homestay.mapper.ZdyHotelHomestayMapper">
|
|
|
|
<resultMap type="ZdyHotelHomestay" id="ZdyHotelHomestayResult">
|
|
<result property="id" column="id"/>
|
|
<result property="sysUserId" column="sys_user_id"/>
|
|
<result property="name" column="name"/>
|
|
<result property="phone" column="phone"/>
|
|
<result property="type" column="type"/>
|
|
<result property="star" column="star"/>
|
|
<result property="label" column="label"/>
|
|
<result property="openingTime" column="opening_time"/>
|
|
<result property="decorationTime" column="decoration_time"/>
|
|
<result property="address" column="address"/>
|
|
<result property="longitude" column="longitude"/>
|
|
<result property="latitude" column="latitude"/>
|
|
<result property="coverImage" column="cover_image"/>
|
|
<result property="carouselImage" column="carousel_image"/>
|
|
<result property="checkInTime" column="check_in_time"/>
|
|
<result property="leaveTime" column="leave_time"/>
|
|
<result property="hourRoomCheckInTime" column="hour_room_check_in_time"/>
|
|
<result property="hourRoomLeaveTime" column="hour_room_leave_time"/>
|
|
<result property="invoice" column="invoice"/>
|
|
<result property="pet" column="pet"/>
|
|
<result property="minLimitedAge" column="min_limited_age"/>
|
|
<result property="importantNotice" column="important_notice"/>
|
|
<result property="checkInWay" column="check_in_way"/>
|
|
<result property="checkInDescription" column="check_in_description"/>
|
|
<result property="grounding" column="grounding"/>
|
|
<result property="flag" column="flag"/>
|
|
<result property="sort" column="sort"/>
|
|
<result property="deptId" column="dept_id"/>
|
|
<result property="storeId" column="store_id"/>
|
|
<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>
|
|
|
|
<resultMap type="ZdyHotelHomestayVO" id="ZdyHotelHomestayVOResult">
|
|
<result property="id" column="id"/>
|
|
<result property="sysUserId" column="sys_user_id"/>
|
|
<result property="name" column="name"/>
|
|
<result property="type" column="type"/>
|
|
<result property="star" column="star"/>
|
|
<result property="label" column="label"/>
|
|
<result property="openingTime" column="opening_time"/>
|
|
<result property="decorationTime" column="decoration_time"/>
|
|
<result property="address" column="address"/>
|
|
<result property="longitude" column="longitude"/>
|
|
<result property="latitude" column="latitude"/>
|
|
<result property="coverImage" column="cover_image"/>
|
|
<result property="carouselImage" column="carousel_image"/>
|
|
<result property="checkInTime" column="check_in_time"/>
|
|
<result property="leaveTime" column="leave_time"/>
|
|
<result property="hourRoomCheckInTime" column="hour_room_check_in_time"/>
|
|
<result property="hourRoomLeaveTime" column="hour_room_leave_time"/>
|
|
<result property="invoice" column="invoice"/>
|
|
<result property="pet" column="pet"/>
|
|
<result property="minLimitedAge" column="min_limited_age"/>
|
|
<result property="importantNotice" column="important_notice"/>
|
|
<result property="checkInWay" column="check_in_way"/>
|
|
<result property="checkInDescription" column="check_in_description"/>
|
|
<result property="grounding" column="grounding"/>
|
|
<result property="flag" column="flag"/>
|
|
<result property="sort" column="sort"/>
|
|
<result property="deptId" column="dept_id"/>
|
|
<result property="storeId" column="store_id"/>
|
|
<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"/>
|
|
<result property="phone" column="phone"/>
|
|
<result property="registerAuditStatus" column="register_audit_status"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectZdyHotelHomestayVo">
|
|
select zhh.id,
|
|
zhh.type,
|
|
zhh.star,
|
|
zhh.label,
|
|
zhh.opening_time,
|
|
zhh.decoration_time,
|
|
zhh.check_in_time,
|
|
zhh.leave_time,
|
|
zhh.hour_room_check_in_time,
|
|
zhh.hour_room_leave_time,
|
|
zhh.invoice,
|
|
zhh.pet,
|
|
zhh.min_limited_age,
|
|
zhh.important_notice,
|
|
zhh.check_in_way,
|
|
zhh.check_in_description,
|
|
zhh.sort,
|
|
zhh.store_id,
|
|
|
|
sbi.grounding_status grounding,
|
|
sbi.register_audit_status register_audit_status,
|
|
sbi.flags flag,
|
|
sbi.dept_id,
|
|
sbi.create_by,
|
|
sbi.create_time,
|
|
sbi.update_by,
|
|
sbi.update_time,
|
|
sbi.remark,
|
|
sbi.name,
|
|
sbi.contact_phone phone,
|
|
sbi.address,
|
|
sbi.longitude,
|
|
sbi.latitude,
|
|
sbi.images cover_image,
|
|
sbi.carousel_image,
|
|
|
|
su.user_id sys_user_id
|
|
from zdy_hotel_homestay zhh
|
|
inner join zdy_store_base_info sbi on sbi.id = zhh.store_id
|
|
inner join sys_user su on sbi.admin_id = su.user_id
|
|
</sql>
|
|
|
|
<select id="selectZdyHotelHomestayList" parameterType="ZdyHotelHomestay" resultMap="ZdyHotelHomestayVOResult">
|
|
<include refid="selectZdyHotelHomestayVo"/>
|
|
<where>
|
|
sbi.del_flag = 0
|
|
<if test="sysUserId != null ">
|
|
and su.user_id = #{sysUserId}
|
|
</if>
|
|
<if test="name != null and name != ''">
|
|
and sbi.name like concat('%', #{name}, '%')
|
|
</if>
|
|
<if test="phone != null and phone != ''">
|
|
and sbi.contact_phone = #{phone}
|
|
</if>
|
|
<if test="type != null ">
|
|
and zhh.type = #{type}
|
|
</if>
|
|
<if test="star != null ">
|
|
and zhh.star = #{star}
|
|
</if>
|
|
<if test="label != null and label != ''">
|
|
and zhh.label = #{label}
|
|
</if>
|
|
<if test="openingTime != null ">
|
|
and zhh.opening_time = #{openingTime}
|
|
</if>
|
|
<if test="decorationTime != null ">
|
|
and zhh.decoration_time = #{decorationTime}
|
|
</if>
|
|
<if test="address != null and address != ''">
|
|
and sbi.address = #{address}
|
|
</if>
|
|
<if test="longitude != null ">
|
|
and sbi.longitude = #{longitude}
|
|
</if>
|
|
<if test="latitude != null ">
|
|
and sbi.latitude = #{latitude}
|
|
</if>
|
|
<if test="coverImage != null and coverImage != ''">
|
|
and sbi.images = #{coverImage}
|
|
</if>
|
|
<if test="carouselImage != null and carouselImage != ''">
|
|
and sbi.carousel_image = #{carouselImage}
|
|
</if>
|
|
<if test="checkInTime != null ">
|
|
and zhh.check_in_time = #{checkInTime}
|
|
</if>
|
|
<if test="leaveTime != null ">
|
|
and zhh.leave_time = #{leaveTime}
|
|
</if>
|
|
<if test="hourRoomCheckInTime != null ">
|
|
and zhh.hour_room_check_in_time = #{hourRoomCheckInTime}
|
|
</if>
|
|
<if test="hourRoomLeaveTime != null ">
|
|
and zhh.hour_room_leave_time = #{hourRoomLeaveTime}
|
|
</if>
|
|
<if test="invoice != null and invoice != ''">
|
|
and zhh.invoice = #{invoice}
|
|
</if>
|
|
<if test="pet != null and pet != ''">
|
|
and zhh.pet = #{pet}
|
|
</if>
|
|
<if test="minLimitedAge != null ">
|
|
and zhh.min_limited_age = #{minLimitedAge}
|
|
</if>
|
|
<if test="importantNotice != null and importantNotice != ''">
|
|
and zhh.important_notice = #{importantNotice}
|
|
</if>
|
|
<if test="checkInWay != null and checkInWay != ''">
|
|
and zhh.check_in_way = #{checkInWay}
|
|
</if>
|
|
<if test="checkInDescription != null and checkInDescription != ''">
|
|
and zhh.check_in_description = #{checkInDescription}
|
|
</if>
|
|
<choose>
|
|
<when test="groundingStatusArray != null and groundingStatusArray.length != 0">
|
|
and sbi.grounding_status in
|
|
<foreach item="grounding" collection="groundingStatusArray" open="(" separator="," close=")">
|
|
#{grounding}
|
|
</foreach>
|
|
</when>
|
|
<otherwise>
|
|
<if test="grounding != null and grounding != ''">
|
|
and sbi.grounding_status = #{grounding}
|
|
</if>
|
|
</otherwise>
|
|
</choose>
|
|
<if test="flag != null and flag != ''">
|
|
and find_in_set(#{flag},sbi.flags) > 0
|
|
</if>
|
|
<if test="sort != null">
|
|
and zhh.sort=#{sort}
|
|
</if>
|
|
<if test="deptId != null ">
|
|
and sbi.dept_id = #{deptId}
|
|
</if>
|
|
<if test="registerAuditStatus != null and registerAuditStatus != '' ">
|
|
and sbi.register_audit_status = #{registerAuditStatus}
|
|
</if>
|
|
${params.dataScope}
|
|
</where>
|
|
order by sort asc
|
|
</select>
|
|
|
|
<select id="appSelectZdyHotelHomestayListSortByDistance" parameterType="ZdyHotelHomestay"
|
|
resultMap="ZdyHotelHomestayVOResult">
|
|
select zhh.id,
|
|
zhh.type,
|
|
zhh.star,
|
|
zhh.label,
|
|
zhh.opening_time,
|
|
zhh.decoration_time,
|
|
zhh.check_in_time,
|
|
zhh.leave_time,
|
|
zhh.hour_room_check_in_time,
|
|
zhh.hour_room_leave_time,
|
|
zhh.invoice,
|
|
zhh.pet,
|
|
zhh.min_limited_age,
|
|
zhh.important_notice,
|
|
zhh.check_in_way,
|
|
zhh.check_in_description,
|
|
zhh.sort,
|
|
|
|
sbi.grounding_status grounding,
|
|
sbi.flags flag,
|
|
|
|
sbi.dept_id,
|
|
sbi.create_by,
|
|
sbi.create_time,
|
|
sbi.update_by,
|
|
sbi.update_time,
|
|
sbi.remark,
|
|
sbi.name,
|
|
sbi.contact_phone phone,
|
|
sbi.address,
|
|
sbi.longitude,
|
|
sbi.latitude,
|
|
sbi.images cover_image,
|
|
sbi.carousel_image,
|
|
su.user_id,
|
|
ROUND(ST_DISTANCE_SPHERE(
|
|
POINT(sbi.longitude, sbi.latitude),
|
|
POINT(#{params.longitude}, #{params.latitude})) / 1000, 2) distance
|
|
from zdy_hotel_homestay zhh
|
|
inner join zdy_store_base_info sbi on sbi.id = zhh.store_id
|
|
inner join sys_user su on sbi.admin_id = su.user_id
|
|
<where>
|
|
sbi.del_flag = 0
|
|
<if test="sysUserId != null ">
|
|
and su.user_id = #{sysUserId}
|
|
</if>
|
|
<if test="name != null and name != ''">
|
|
and sbi.name like concat('%', #{name}, '%')
|
|
</if>
|
|
<if test="phone != null and phone != ''">
|
|
and sbi.contact_phone = #{phone}
|
|
</if>
|
|
<if test="type != null ">
|
|
and zhh.type = #{type}
|
|
</if>
|
|
<if test="star != null ">
|
|
and zhh.star = #{star}
|
|
</if>
|
|
<if test="label != null and label != ''">
|
|
and zhh.label = #{label}
|
|
</if>
|
|
<if test="openingTime != null ">
|
|
and zhh.opening_time = #{openingTime}
|
|
</if>
|
|
<if test="decorationTime != null ">
|
|
and zhh.decoration_time = #{decorationTime}
|
|
</if>
|
|
<if test="address != null and address != ''">
|
|
and sbi.address = #{address}
|
|
</if>
|
|
<if test="longitude != null ">
|
|
and sbi.longitude = #{longitude}
|
|
</if>
|
|
<if test="latitude != null ">
|
|
and sbi.latitude = #{latitude}
|
|
</if>
|
|
<if test="coverImage != null and coverImage != ''">
|
|
and sbi.images = #{coverImage}
|
|
</if>
|
|
<if test="carouselImage != null and carouselImage != ''">
|
|
and sbi.carousel_image = #{carouselImage}
|
|
</if>
|
|
<if test="checkInTime != null ">
|
|
and zhh.check_in_time = #{checkInTime}
|
|
</if>
|
|
<if test="leaveTime != null ">
|
|
and zhh.leave_time = #{leaveTime}
|
|
</if>
|
|
<if test="hourRoomCheckInTime != null ">
|
|
and zhh.hour_room_check_in_time = #{hourRoomCheckInTime}
|
|
</if>
|
|
<if test="hourRoomLeaveTime != null ">
|
|
and zhh.hour_room_leave_time = #{hourRoomLeaveTime}
|
|
</if>
|
|
<if test="invoice != null and invoice != ''">
|
|
and zhh.invoice = #{invoice}
|
|
</if>
|
|
<if test="pet != null and pet != ''">
|
|
and zhh.pet = #{pet}
|
|
</if>
|
|
<if test="minLimitedAge != null ">
|
|
and zhh.min_limited_age = #{minLimitedAge}
|
|
</if>
|
|
<if test="importantNotice != null and importantNotice != ''">
|
|
and zhh.important_notice = #{importantNotice}
|
|
</if>
|
|
<if test="checkInWay != null and checkInWay != ''">
|
|
and zhh.check_in_way = #{checkInWay}
|
|
</if>
|
|
<if test="checkInDescription != null and checkInDescription != ''">
|
|
and zhh.check_in_description = #{checkInDescription}
|
|
</if>
|
|
<if test="grounding != null">
|
|
and sbi.grounding_status = #{grounding}
|
|
</if>
|
|
<if test="flag != null and flag != ''">
|
|
and find_in_set(#{flag},sbi.flags) > 0
|
|
</if>
|
|
<if test="sort != null">
|
|
and zhh.sort=#{sort}
|
|
</if>
|
|
<if test="deptId != null ">
|
|
and sbi.dept_id = #{deptId}
|
|
</if>
|
|
</where>
|
|
order by ISNULL(distance), distance asc
|
|
</select>
|
|
|
|
<select id="appSelectZdyHotelHomestayList" parameterType="ZdyHotelHomestayDTO"
|
|
resultMap="ZdyHotelHomestayVOResult">
|
|
<include refid="selectZdyHotelHomestayVo"/>
|
|
<where>
|
|
sbi.del_flag = 0
|
|
<if test="sysUserId != null ">
|
|
and su.user_id = #{sysUserId}
|
|
</if>
|
|
<if test="name != null and name != ''">
|
|
and sbi.name like concat('%', #{name}, '%')
|
|
</if>
|
|
<if test="phone != null and phone != ''">
|
|
and sbi.contact_phone = #{phone}
|
|
</if>
|
|
<if test="type != null ">
|
|
and zhh.type = #{type}
|
|
</if>
|
|
<if test="star != null ">
|
|
and zhh.star = #{star}
|
|
</if>
|
|
<if test="label != null and label != ''">
|
|
and zhh.label = #{label}
|
|
</if>
|
|
<if test="openingTime != null ">
|
|
and zhh.opening_time = #{openingTime}
|
|
</if>
|
|
<if test="decorationTime != null ">
|
|
and zhh.decoration_time = #{decorationTime}
|
|
</if>
|
|
<if test="address != null and address != ''">
|
|
and sbi.address = #{address}
|
|
</if>
|
|
<if test="longitude != null ">
|
|
and sbi.longitude = #{longitude}
|
|
</if>
|
|
<if test="latitude != null ">
|
|
and sbi.latitude = #{latitude}
|
|
</if>
|
|
<if test="coverImage != null and coverImage != ''">
|
|
and sbi.images = #{coverImage}
|
|
</if>
|
|
<if test="carouselImage != null and carouselImage != ''">
|
|
and sbi.carousel_image = #{carouselImage}
|
|
</if>
|
|
<if test="checkInTime != null ">
|
|
and zhh.check_in_time = #{checkInTime}
|
|
</if>
|
|
<if test="leaveTime != null ">
|
|
and zhh.leave_time = #{leaveTime}
|
|
</if>
|
|
<if test="hourRoomCheckInTime != null ">
|
|
and zhh.hour_room_check_in_time = #{hourRoomCheckInTime}
|
|
</if>
|
|
<if test="hourRoomLeaveTime != null ">
|
|
and zhh.hour_room_leave_time = #{hourRoomLeaveTime}
|
|
</if>
|
|
<if test="invoice != null and invoice != ''">
|
|
and zhh.invoice = #{invoice}
|
|
</if>
|
|
<if test="pet != null and pet != ''">
|
|
and zhh.pet = #{pet}
|
|
</if>
|
|
<if test="minLimitedAge != null ">
|
|
and zhh.min_limited_age = #{minLimitedAge}
|
|
</if>
|
|
<if test="importantNotice != null and importantNotice != ''">
|
|
and zhh.important_notice = #{importantNotice}
|
|
</if>
|
|
<if test="checkInWay != null and checkInWay != ''">
|
|
and zhh.check_in_way = #{checkInWay}
|
|
</if>
|
|
<if test="checkInDescription != null and checkInDescription != ''">
|
|
and zhh.check_in_description = #{checkInDescription}
|
|
</if>
|
|
<if test="grounding != null">
|
|
and sbi.grounding_status = #{grounding}
|
|
</if>
|
|
<if test="flag != null and flag != ''">
|
|
and find_in_set(#{flag},sbi.flags) > 0
|
|
</if>
|
|
<if test="sort != null">
|
|
and zhh.sort=#{sort}
|
|
</if>
|
|
<if test="deptId != null ">
|
|
and sbi.dept_id = #{deptId}
|
|
</if>
|
|
<if test="registerAuditStatus != null and registerAuditStatus!=''">
|
|
and sbi.register_audit_status = #{registerAuditStatus}
|
|
</if>
|
|
</where>
|
|
order by sort asc
|
|
</select>
|
|
|
|
<select id="selectZdyHotelHomestayRecommend" parameterType="ZdyHotelHomestayDTO"
|
|
resultMap="ZdyHotelHomestayVOResult">
|
|
<include refid="selectZdyHotelHomestayVo"/>
|
|
<where>
|
|
sbi.del_flag = 0
|
|
and find_in_set('recommend',sbi.flags) > 0
|
|
<if test="sysUserId != null ">
|
|
and su.user_id = #{sysUserId}
|
|
</if>
|
|
<if test="name != null and name != ''">
|
|
and sbi.name like concat('%', #{name}, '%')
|
|
</if>
|
|
<if test="phone != null and phone != ''">
|
|
and sbi.contact_phone = #{phone}
|
|
</if>
|
|
<if test="type != null ">
|
|
and zhh.type = #{type}
|
|
</if>
|
|
<if test="star != null ">
|
|
and zhh.star = #{star}
|
|
</if>
|
|
<if test="label != null and label != ''">
|
|
and zhh.label = #{label}
|
|
</if>
|
|
<if test="openingTime != null ">
|
|
and zhh.opening_time = #{openingTime}
|
|
</if>
|
|
<if test="decorationTime != null ">
|
|
and zhh.decoration_time = #{decorationTime}
|
|
</if>
|
|
<if test="address != null and address != ''">
|
|
and sbi.address = #{address}
|
|
</if>
|
|
<if test="longitude != null ">
|
|
and sbi.longitude = #{longitude}
|
|
</if>
|
|
<if test="latitude != null ">
|
|
and sbi.latitude = #{latitude}
|
|
</if>
|
|
<if test="coverImage != null and coverImage != ''">
|
|
and sbi.images = #{coverImage}
|
|
</if>
|
|
<if test="carouselImage != null and carouselImage != ''">
|
|
and sbi.carousel_image = #{carouselImage}
|
|
</if>
|
|
<if test="checkInTime != null ">
|
|
and zhh.check_in_time = #{checkInTime}
|
|
</if>
|
|
<if test="leaveTime != null ">
|
|
and zhh.leave_time = #{leaveTime}
|
|
</if>
|
|
<if test="hourRoomCheckInTime != null ">
|
|
and zhh.hour_room_check_in_time = #{hourRoomCheckInTime}
|
|
</if>
|
|
<if test="hourRoomLeaveTime != null ">
|
|
and zhh.hour_room_leave_time = #{hourRoomLeaveTime}
|
|
</if>
|
|
<if test="invoice != null and invoice != ''">
|
|
and zhh.invoice = #{invoice}
|
|
</if>
|
|
<if test="pet != null and pet != ''">
|
|
and zhh.pet = #{pet}
|
|
</if>
|
|
<if test="minLimitedAge != null ">
|
|
and zhh.min_limited_age = #{minLimitedAge}
|
|
</if>
|
|
<if test="importantNotice != null and importantNotice != ''">
|
|
and zhh.important_notice = #{importantNotice}
|
|
</if>
|
|
<if test="checkInWay != null and checkInWay != ''">
|
|
and zhh.check_in_way = #{checkInWay}
|
|
</if>
|
|
<if test="checkInDescription != null and checkInDescription != ''">
|
|
and zhh.check_in_description = #{checkInDescription}
|
|
</if>
|
|
<if test="grounding != null">
|
|
and sbi.grounding_status = #{grounding}
|
|
</if>
|
|
<if test="sort != null">
|
|
and zhh.sort=#{sort}
|
|
</if>
|
|
<if test="deptId != null ">
|
|
and sbi.dept_id = #{deptId}
|
|
</if>
|
|
<if test="registerAuditStatus != null and registerAuditStatus!=''">
|
|
and sbi.register_audit_status =#{registerAuditStatus}
|
|
</if>
|
|
|
|
</where>
|
|
</select>
|
|
<select id="selectZdyHotelHomestayById" parameterType="Long" resultMap="ZdyHotelHomestayVOResult">
|
|
<include refid="selectZdyHotelHomestayVo"/>
|
|
where zhh.id = #{id} and sbi.del_flag = 0
|
|
</select>
|
|
|
|
<select id="selectZdyHotelHomestayByIds" parameterType="Long" resultMap="ZdyHotelHomestayVOResult">
|
|
<include refid="selectZdyHotelHomestayVo"/>
|
|
<where>
|
|
sbi.del_flag = 0
|
|
<if test="ids != null and ids.size() != 0">
|
|
and zhh.id in
|
|
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</if>
|
|
</where>
|
|
|
|
</select>
|
|
<select id="selectZdyHotelHomestayByDeptId" resultMap="ZdyHotelHomestayVOResult">
|
|
<include refid="selectZdyHotelHomestayVo"/>
|
|
where sbi.dept_id = #{deptId} and sbi.del_flag = 0
|
|
</select>
|
|
|
|
<insert id="insertZdyHotelHomestay" parameterType="ZdyHotelHomestay" useGeneratedKeys="true"
|
|
keyProperty="id">
|
|
insert into zdy_hotel_homestay
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="storeId != null">
|
|
id,
|
|
</if>
|
|
<if test="type != null">type,
|
|
</if>
|
|
<if test="star != null">star,
|
|
</if>
|
|
<if test="label != null">label,
|
|
</if>
|
|
<if test="openingTime != null">opening_time,
|
|
</if>
|
|
<if test="decorationTime != null">decoration_time,
|
|
</if>
|
|
<if test="checkInTime != null">check_in_time,
|
|
</if>
|
|
<if test="leaveTime != null">leave_time,
|
|
</if>
|
|
<if test="hourRoomCheckInTime != null">hour_room_check_in_time,
|
|
</if>
|
|
<if test="hourRoomLeaveTime != null">hour_room_leave_time,
|
|
</if>
|
|
<if test="invoice != null">invoice,
|
|
</if>
|
|
<if test="pet != null">pet,
|
|
</if>
|
|
<if test="minLimitedAge != null">min_limited_age,
|
|
</if>
|
|
<if test="importantNotice != null">important_notice,
|
|
</if>
|
|
<if test="checkInWay != null">check_in_way,
|
|
</if>
|
|
<if test="checkInDescription != null">check_in_description,
|
|
</if>
|
|
<if test="storeId != null">
|
|
store_id,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="storeId != null">#{storeId},
|
|
</if>
|
|
<if test="type != null">#{type},
|
|
</if>
|
|
<if test="star != null">#{star},
|
|
</if>
|
|
<if test="label != null">#{label},
|
|
</if>
|
|
<if test="openingTime != null">#{openingTime},
|
|
</if>
|
|
<if test="decorationTime != null">#{decorationTime},
|
|
</if>
|
|
<if test="checkInTime != null">#{checkInTime},
|
|
</if>
|
|
<if test="leaveTime != null">#{leaveTime},
|
|
</if>
|
|
<if test="hourRoomCheckInTime != null">#{hourRoomCheckInTime},
|
|
</if>
|
|
<if test="hourRoomLeaveTime != null">#{hourRoomLeaveTime},
|
|
</if>
|
|
<if test="invoice != null">#{invoice},
|
|
</if>
|
|
<if test="pet != null">#{pet},
|
|
</if>
|
|
<if test="minLimitedAge != null">#{minLimitedAge},
|
|
</if>
|
|
<if test="importantNotice != null">#{importantNotice},
|
|
</if>
|
|
<if test="checkInWay != null">#{checkInWay},
|
|
</if>
|
|
<if test="checkInDescription != null">#{checkInDescription},
|
|
</if>
|
|
<if test="storeId != null">
|
|
#{storeId},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateZdyHotelHomestay" parameterType="ZdyHotelHomestay">
|
|
update zdy_hotel_homestay
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="type != null">type =
|
|
#{type},
|
|
</if>
|
|
<if test="star != null">star =
|
|
#{star},
|
|
</if>
|
|
<if test="label != null">label =
|
|
#{label},
|
|
</if>
|
|
<if test="openingTime != null">opening_time =
|
|
#{openingTime},
|
|
</if>
|
|
<if test="decorationTime != null">decoration_time =
|
|
#{decorationTime},
|
|
</if>
|
|
<if test="checkInTime != null">check_in_time =
|
|
#{checkInTime},
|
|
</if>
|
|
<if test="leaveTime != null">leave_time =
|
|
#{leaveTime},
|
|
</if>
|
|
<if test="hourRoomCheckInTime != null">hour_room_check_in_time =
|
|
#{hourRoomCheckInTime},
|
|
</if>
|
|
<if test="hourRoomLeaveTime != null">hour_room_leave_time =
|
|
#{hourRoomLeaveTime},
|
|
</if>
|
|
<if test="invoice != null">invoice =
|
|
#{invoice},
|
|
</if>
|
|
<if test="pet != null">pet =
|
|
#{pet},
|
|
</if>
|
|
<if test="minLimitedAge != null">min_limited_age =
|
|
#{minLimitedAge},
|
|
</if>
|
|
<if test="importantNotice != null">important_notice =
|
|
#{importantNotice},
|
|
</if>
|
|
<if test="checkInWay != null">check_in_way =
|
|
#{checkInWay},
|
|
</if>
|
|
<if test="checkInDescription != null">check_in_description =
|
|
#{checkInDescription},
|
|
</if>
|
|
<if test="checkInDescription != null">check_in_description =
|
|
#{checkInDescription},
|
|
</if>
|
|
sort = #{sort}
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteZdyHotelHomestayById" parameterType="Long">
|
|
delete
|
|
from zdy_hotel_homestay
|
|
where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteZdyHotelHomestayByIds" parameterType="String">
|
|
update sys_user set del_flag = 2 where user_id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<update id="updateStoreInfoByStoreId" parameterType="ZdyHotelHomestay">
|
|
update zdy_hotel_homestay
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="type != null">type =
|
|
#{type},
|
|
</if>
|
|
<if test="star != null">star =
|
|
#{star},
|
|
</if>
|
|
<if test="label != null">label =
|
|
#{label},
|
|
</if>
|
|
<if test="openingTime != null">opening_time =
|
|
#{openingTime},
|
|
</if>
|
|
<if test="decorationTime != null">decoration_time =
|
|
#{decorationTime},
|
|
</if>
|
|
<if test="checkInTime != null">check_in_time =
|
|
#{checkInTime},
|
|
</if>
|
|
<if test="leaveTime != null">leave_time =
|
|
#{leaveTime},
|
|
</if>
|
|
<if test="hourRoomCheckInTime != null">hour_room_check_in_time =
|
|
#{hourRoomCheckInTime},
|
|
</if>
|
|
<if test="hourRoomLeaveTime != null">hour_room_leave_time =
|
|
#{hourRoomLeaveTime},
|
|
</if>
|
|
<if test="invoice != null">invoice =
|
|
#{invoice},
|
|
</if>
|
|
<if test="pet != null">pet =
|
|
#{pet},
|
|
</if>
|
|
<if test="minLimitedAge != null">min_limited_age =
|
|
#{minLimitedAge},
|
|
</if>
|
|
<if test="importantNotice != null">important_notice =
|
|
#{importantNotice},
|
|
</if>
|
|
<if test="checkInWay != null">check_in_way =
|
|
#{checkInWay},
|
|
</if>
|
|
<if test="checkInDescription != null">check_in_description =
|
|
#{checkInDescription},
|
|
</if>
|
|
<if test="sort != null">
|
|
sort = #{sort},
|
|
</if>
|
|
<if test="storeId != null">
|
|
store_id = #{storeId}
|
|
</if>
|
|
</trim>
|
|
where store_id = #{storeId}
|
|
</update>
|
|
|
|
<select id="getByStoreId" parameterType="Long" resultMap="ZdyHotelHomestayVOResult">
|
|
<include refid="selectZdyHotelHomestayVo"/>
|
|
where store_id = #{storeId}
|
|
</select>
|
|
<select id="selectBaseList" resultType="java.util.Map">
|
|
SELECT
|
|
b.id,
|
|
b.name,
|
|
b.contact_name as contactName,
|
|
b.contact_phone as phone,
|
|
b.business_start_hours as beginTime,
|
|
b.business_end_hours as endTime,
|
|
b.address as address,
|
|
b.longitude as longitude,
|
|
b.latitude as latitude,
|
|
b.images as image,
|
|
b.legal_person_name as legalPersonName,
|
|
b.legal_person_phone as legalPersonPhone,
|
|
b.business_license as businessLicense
|
|
FROM
|
|
zdy_hotel_homestay e
|
|
LEFT JOIN zdy_store_base_info b on e.store_id=b.id where !ISNULL(b.id)
|
|
</select>
|
|
</mapper>
|