支付
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,91 @@
|
||||
<?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.order.mapper.ZdyHotelHomestayOrderLogMapper">
|
||||
|
||||
<resultMap type="ZdyHotelHomestayOrderLog" id="ZdyHotelHomestayOrderLogResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="statusType" column="status_type"/>
|
||||
<result property="statusValue" column="status_value"/>
|
||||
<result property="createZdyUserId" column="create_zdy_user_id"/>
|
||||
<result property="createSysUserId" column="create_sys_user_id"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyHotelHomestayOrderLogVo">
|
||||
select id,
|
||||
order_id,
|
||||
status_type,
|
||||
status_value,
|
||||
create_zdy_user_id,
|
||||
create_sys_user_id,
|
||||
content,
|
||||
create_time
|
||||
from zdy_hotel_homestay_order_log
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyHotelHomestayOrderLogList" parameterType="ZdyHotelHomestayOrderLog"
|
||||
resultMap="ZdyHotelHomestayOrderLogResult">
|
||||
<include refid="selectZdyHotelHomestayOrderLogVo"/>
|
||||
<where>
|
||||
<if test="orderId != null ">
|
||||
and order_id = #{orderId}
|
||||
</if>
|
||||
<if test="statusType != null and statusType != ''">
|
||||
and status_type = #{statusType}
|
||||
</if>
|
||||
<if test="statusValue != null and statusValue != ''">
|
||||
and status_value = #{statusValue}
|
||||
</if>
|
||||
<if test="createZdyUserId != null ">
|
||||
and create_zdy_user_id = #{createZdyUserId}
|
||||
</if>
|
||||
<if test="createSysUserId != null ">
|
||||
and create_sys_user_id = #{createSysUserId}
|
||||
</if>
|
||||
<if test="content != null and content != ''">
|
||||
and content = #{content}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyHotelHomestayOrderLog" parameterType="ZdyHotelHomestayOrderLog" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_hotel_homestay_order_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,
|
||||
</if>
|
||||
<if test="statusType != null">status_type,
|
||||
</if>
|
||||
<if test="statusValue != null">status_value,
|
||||
</if>
|
||||
<if test="createZdyUserId != null">create_zdy_user_id,
|
||||
</if>
|
||||
<if test="createSysUserId != null">create_sys_user_id,
|
||||
</if>
|
||||
<if test="content != null">content,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},
|
||||
</if>
|
||||
<if test="statusType != null">#{statusType},
|
||||
</if>
|
||||
<if test="statusValue != null">#{statusValue},
|
||||
</if>
|
||||
<if test="createZdyUserId != null">#{createZdyUserId},
|
||||
</if>
|
||||
<if test="createSysUserId != null">#{createSysUserId},
|
||||
</if>
|
||||
<if test="content != null">#{content},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
</mapper>
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,339 @@
|
||||
<?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.order.mapper.ZdyHotelHomestayOrderRefundMapper">
|
||||
|
||||
<resultMap type="ZdyHotelHomestayOrderRefund" id="ZdyHotelHomestayOrderRefundResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="orderCode" column="order_code"/>
|
||||
<result property="refundCode" column="refund_code"/>
|
||||
<result property="orderPrepayId" column="order_prepay_id"/>
|
||||
<result property="refundSource" column="refund_source"/>
|
||||
<result property="totalAmount" column="total_amount"/>
|
||||
<result property="penaltyFee" column="penalty_fee"/>
|
||||
<result property="actualAmount" column="actual_amount"/>
|
||||
<result property="refundStatus" column="refund_status"/>
|
||||
<result property="refundTime" column="refund_time"/>
|
||||
<result property="personalRefundType" column="personal_refund_type"/>
|
||||
<result property="businessRefundDesc" column="business_refund_desc"/>
|
||||
<result property="rejectionDesc" column="rejection_desc"/>
|
||||
<result property="auditTime" column="audit_time"/>
|
||||
<result property="createZdyUserId" column="create_zdy_user_id"/>
|
||||
<result property="createSysUserId" column="create_sys_user_id"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updaterId" column="updater_id"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyHotelHomestayOrderRefundVo">
|
||||
select id,
|
||||
order_id,
|
||||
order_code,
|
||||
refund_code,
|
||||
order_prepay_id,
|
||||
refund_source,
|
||||
total_amount,
|
||||
penalty_fee,
|
||||
actual_amount,
|
||||
refund_status,
|
||||
refund_time,
|
||||
personal_refund_type,
|
||||
business_refund_desc,
|
||||
rejection_desc,
|
||||
audit_time,
|
||||
create_zdy_user_id,
|
||||
create_sys_user_id,
|
||||
create_time,
|
||||
updater_id,
|
||||
update_time
|
||||
from zdy_hotel_homestay_order_refund
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyHotelHomestayOrderRefundList" parameterType="ZdyHotelHomestayOrderRefund"
|
||||
resultMap="ZdyHotelHomestayOrderRefundResult">
|
||||
<include refid="selectZdyHotelHomestayOrderRefundVo"/>
|
||||
<where>
|
||||
<if test="orderId != null ">
|
||||
and order_id = #{orderId}
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
and order_code = #{orderCode}
|
||||
</if>
|
||||
<if test="refundCode != null and refundCode != ''">
|
||||
and refund_code = #{refundCode}
|
||||
</if>
|
||||
<if test="orderPrepayId != null and orderPrepayId != ''">
|
||||
and order_prepay_id = #{orderPrepayId}
|
||||
</if>
|
||||
<if test="refundSource != null and refundSource != ''">
|
||||
and refund_source = #{refundSource}
|
||||
</if>
|
||||
<if test="totalAmount != null ">
|
||||
and total_amount = #{totalAmount}
|
||||
</if>
|
||||
<if test="penaltyFee != null ">
|
||||
and penalty_fee = #{penaltyFee}
|
||||
</if>
|
||||
<if test="actualAmount != null ">
|
||||
and actual_amount = #{actualAmount}
|
||||
</if>
|
||||
<if test="refundStatus != null and refundStatus != ''">
|
||||
and refund_status = #{refundStatus}
|
||||
</if>
|
||||
<if test="refundTime != null ">
|
||||
and refund_time = #{refundTime}
|
||||
</if>
|
||||
<if test="personalRefundType != null and personalRefundType != ''">
|
||||
and personal_refund_type = #{personalRefundType}
|
||||
</if>
|
||||
<if test="businessRefundDesc != null and businessRefundDesc != ''">
|
||||
and business_refund_desc = #{businessRefundDesc}
|
||||
</if>
|
||||
<if test="rejectionDesc != null and rejectionDesc != ''">
|
||||
and rejection_desc = #{rejectionDesc}
|
||||
</if>
|
||||
<if test="createZdyUserId != null ">
|
||||
and create_zdy_user_id = #{createZdyUserId}
|
||||
</if>
|
||||
<if test="createSysUserId != null ">
|
||||
and create_sys_user_id = #{createSysUserId}
|
||||
</if>
|
||||
<if test="updaterId != null ">
|
||||
and updater_id = #{updaterId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyHotelHomestayOrderRefundById" parameterType="Long"
|
||||
resultMap="ZdyHotelHomestayOrderRefundResult">
|
||||
<include refid="selectZdyHotelHomestayOrderRefundVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyHotelHomestayOrderRefund" parameterType="ZdyHotelHomestayOrderRefund" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_hotel_homestay_order_refund
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">order_code,
|
||||
</if>
|
||||
<if test="refundCode != null and refundCode != ''">refund_code,
|
||||
</if>
|
||||
<if test="orderPrepayId != null">order_prepay_id,
|
||||
</if>
|
||||
<if test="refundSource != null">refund_source,
|
||||
</if>
|
||||
<if test="totalAmount != null">total_amount,
|
||||
</if>
|
||||
<if test="penaltyFee != null">penalty_fee,
|
||||
</if>
|
||||
<if test="actualAmount != null">actual_amount,
|
||||
</if>
|
||||
<if test="refundStatus != null and refundStatus != ''">refund_status,
|
||||
</if>
|
||||
<if test="refundTime != null">refund_time,
|
||||
</if>
|
||||
<if test="personalRefundType != null">personal_refund_type,
|
||||
</if>
|
||||
<if test="businessRefundDesc != null">business_refund_desc,
|
||||
</if>
|
||||
<if test="rejectionDesc != null">rejection_desc,
|
||||
</if>
|
||||
<if test="auditTime != null">audit_time,
|
||||
</if>
|
||||
<if test="createZdyUserId != null">create_zdy_user_id,
|
||||
</if>
|
||||
<if test="createSysUserId != null">create_sys_user_id,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="updaterId != null">updater_id,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">#{orderCode},
|
||||
</if>
|
||||
<if test="refundCode != null and refundCode != ''">#{refundCode},
|
||||
</if>
|
||||
<if test="orderPrepayId != null">#{orderPrepayId},
|
||||
</if>
|
||||
<if test="refundSource != null">#{refundSource},
|
||||
</if>
|
||||
<if test="totalAmount != null">#{totalAmount},
|
||||
</if>
|
||||
<if test="penaltyFee != null">#{penaltyFee},
|
||||
</if>
|
||||
<if test="actualAmount != null">#{actualAmount},
|
||||
</if>
|
||||
<if test="refundStatus != null and refundStatus != ''">#{refundStatus},
|
||||
</if>
|
||||
<if test="refundTime != null">#{refundTime},
|
||||
</if>
|
||||
<if test="personalRefundType != null">#{personalRefundType},
|
||||
</if>
|
||||
<if test="businessRefundDesc != null">#{businessRefundDesc},
|
||||
</if>
|
||||
<if test="rejectionDesc != null">#{rejectionDesc},
|
||||
</if>
|
||||
<if test="auditTime != null">#{auditTime},
|
||||
</if>
|
||||
<if test="createZdyUserId != null">#{createZdyUserId},
|
||||
</if>
|
||||
<if test="createSysUserId != null">#{createSysUserId},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="updaterId != null">#{updaterId},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyHotelHomestayOrderRefund" parameterType="ZdyHotelHomestayOrderRefund">
|
||||
update zdy_hotel_homestay_order_refund
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id =
|
||||
#{orderId},
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">order_code =
|
||||
#{orderCode},
|
||||
</if>
|
||||
<if test="refundCode != null and refundCode != ''">refund_code =
|
||||
#{refundCode},
|
||||
</if>
|
||||
<if test="orderPrepayId != null">order_prepay_id =
|
||||
#{orderPrepayId},
|
||||
</if>
|
||||
<if test="refundSource != null">refund_source =
|
||||
#{refundSource},
|
||||
</if>
|
||||
<if test="totalAmount != null">total_amount =
|
||||
#{totalAmount},
|
||||
</if>
|
||||
<if test="penaltyFee != null">penalty_fee =
|
||||
#{penaltyFee},
|
||||
</if>
|
||||
<if test="actualAmount != null">actual_amount =
|
||||
#{actualAmount},
|
||||
</if>
|
||||
<if test="refundStatus != null and refundStatus != ''">refund_status =
|
||||
#{refundStatus},
|
||||
</if>
|
||||
<if test="refundTime != null">refund_time =
|
||||
#{refundTime},
|
||||
</if>
|
||||
<if test="personalRefundType != null">personal_refund_type =
|
||||
#{personalRefundType},
|
||||
</if>
|
||||
<if test="businessRefundDesc != null">business_refund_desc =
|
||||
#{businessRefundDesc},
|
||||
</if>
|
||||
<if test="rejectionDesc != null">rejection_desc =
|
||||
#{rejectionDesc},
|
||||
</if>
|
||||
<if test="auditTime != null">audit_time =
|
||||
#{auditTime},
|
||||
</if>
|
||||
<if test="createZdyUserId != null">create_zdy_user_id =
|
||||
#{createZdyUserId},
|
||||
</if>
|
||||
<if test="createSysUserId != null">create_sys_user_id =
|
||||
#{createSysUserId},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updaterId != null">updater_id =
|
||||
#{updaterId},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateByOrderCodeAndRefundCode" parameterType="ZdyHotelHomestayOrderRefund">
|
||||
update zdy_hotel_homestay_order_refund
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id =
|
||||
#{orderId},
|
||||
</if>
|
||||
<if test="orderPrepayId != null">order_prepay_id =
|
||||
#{orderPrepayId},
|
||||
</if>
|
||||
<if test="refundSource != null">refund_source =
|
||||
#{refundSource},
|
||||
</if>
|
||||
<if test="totalAmount != null">total_amount =
|
||||
#{totalAmount},
|
||||
</if>
|
||||
<if test="penaltyFee != null">penalty_fee =
|
||||
#{penaltyFee},
|
||||
</if>
|
||||
<if test="actualAmount != null">actual_amount =
|
||||
#{actualAmount},
|
||||
</if>
|
||||
<if test="refundStatus != null and refundStatus != ''">refund_status =
|
||||
#{refundStatus},
|
||||
</if>
|
||||
<if test="refundTime != null">refund_time =
|
||||
#{refundTime},
|
||||
</if>
|
||||
<if test="personalRefundType != null">personal_refund_type =
|
||||
#{personalRefundType},
|
||||
</if>
|
||||
<if test="businessRefundDesc != null">business_refund_desc =
|
||||
#{businessRefundDesc},
|
||||
</if>
|
||||
<if test="rejectionDesc != null">rejection_desc =
|
||||
#{rejectionDesc},
|
||||
</if>
|
||||
<if test="auditTime != null">audit_time =
|
||||
#{auditTime},
|
||||
</if>
|
||||
<if test="createZdyUserId != null">create_zdy_user_id =
|
||||
#{createZdyUserId},
|
||||
</if>
|
||||
<if test="createSysUserId != null">create_sys_user_id =
|
||||
#{createSysUserId},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updaterId != null">updater_id =
|
||||
#{updaterId},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
where
|
||||
order_code = #{orderCode}
|
||||
and refund_code = #{refundCode}
|
||||
</update>
|
||||
|
||||
<select id="getByOrderCodeAndRefundCode" resultMap="ZdyHotelHomestayOrderRefundResult">
|
||||
<include refid="selectZdyHotelHomestayOrderRefundVo"/>
|
||||
where
|
||||
order_code = #{orderCode}
|
||||
and refund_code = #{refundCode}
|
||||
</select>
|
||||
|
||||
<select id="getLastByOrderIdAndStatus" resultMap="ZdyHotelHomestayOrderRefundResult">
|
||||
<include refid="selectZdyHotelHomestayOrderRefundVo"/>
|
||||
where order_id = #{orderId}
|
||||
and refund_status = #{refundStatus}
|
||||
order by create_time desc
|
||||
${"limit 1"}
|
||||
</select>
|
||||
</mapper>
|
@@ -0,0 +1,58 @@
|
||||
<?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.order.mapper.ZdyHotelHomestayOrderRoomBookingMapper">
|
||||
|
||||
<sql id="listUnavailableRoomIds">
|
||||
SELECT DISTINCT room_id
|
||||
FROM zdy_hotel_homestay_room_status
|
||||
WHERE (`start_time` >= #{inDateTime} AND
|
||||
`end_time` <= #{outDateTime})
|
||||
OR (`start_time` < #{inDateTime} AND
|
||||
`end_time` BETWEEN #{inDateTime} AND #{outDateTime})
|
||||
OR (`start_time` BETWEEN #{inDateTime} AND #{outDateTime} AND
|
||||
`end_time` > #{outDateTime})
|
||||
</sql>
|
||||
|
||||
<select id="existsAvailableRoomsByType" parameterType="ZdyHotelHomestayOrder" resultType="Integer">
|
||||
SELECT EXISTS
|
||||
(SELECT 1
|
||||
FROM zdy_hotel_homestay_room
|
||||
WHERE hotel_homestay_room_classify_id = #{roomClassifyId}
|
||||
AND del_flag = '0'
|
||||
AND id NOT IN (
|
||||
<include refid="listUnavailableRoomIds"/>
|
||||
))
|
||||
</select>
|
||||
|
||||
<select id="listUnavailableRoomNumbersByIds" parameterType="ZdyHotelHomestayOrder" resultType="String">
|
||||
SELECT zhhr.number
|
||||
FROM zdy_hotel_homestay_room_status zhhrs
|
||||
left join zdy_hotel_homestay_room zhhr on zhhr.id = zhhrs.room_id
|
||||
WHERE zhhrs.room_id in
|
||||
<foreach item="roomId" collection="roomIds" open="(" separator="," close=")">
|
||||
#{roomId}
|
||||
</foreach>
|
||||
and (
|
||||
(`start_time` >= #{inDateTime} AND
|
||||
`end_time` <= #{outDateTime})
|
||||
OR (`start_time` < #{inDateTime} AND
|
||||
`end_time` BETWEEN #{inDateTime} AND #{outDateTime})
|
||||
OR (`start_time` BETWEEN #{inDateTime} AND #{outDateTime} AND
|
||||
`end_time` > #{outDateTime})
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="listAvailableRoomIdsByType" parameterType="ZdyHotelHomestayOrder" resultType="Long">
|
||||
SELECT id
|
||||
FROM zdy_hotel_homestay_room
|
||||
WHERE hotel_homestay_room_classify_id = #{roomClassifyId}
|
||||
AND del_flag = '0'
|
||||
AND id NOT IN (
|
||||
<include refid="listUnavailableRoomIds"/>
|
||||
)
|
||||
limit 0, #{roomQuantity}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@@ -0,0 +1,53 @@
|
||||
<?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.order.mapper.ZdyHotelHomestayOrderRoomChargeDetailMapper">
|
||||
|
||||
<resultMap type="ZdyHotelHomestayOrderRoomChargeDetail" id="ZdyHotelHomestayOrderRoomChargeDetailResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="stayDate" column="stay_date"/>
|
||||
<result property="roomQuantity" column="room_quantity"/>
|
||||
<result property="roomCharge" column="room_charge"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyHotelHomestayOrderRoomChargeDetailVo">
|
||||
select id, order_id, stay_date, room_charge
|
||||
from zdy_hotel_homestay_order_room_charge_detail
|
||||
</sql>
|
||||
|
||||
<select id="listRoomChargeDetailByOrderId" parameterType="Long"
|
||||
resultMap="ZdyHotelHomestayOrderRoomChargeDetailResult">
|
||||
select stay_date, count(*) as room_quantity, sum(room_charge) as room_charge
|
||||
from zdy_hotel_homestay_order_room_charge_detail
|
||||
where order_id = #{orderId}
|
||||
group by stay_date
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyHotelHomestayOrderRoomChargeDetail" parameterType="ZdyHotelHomestayOrderRoomChargeDetail"
|
||||
useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_hotel_homestay_order_room_charge_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,
|
||||
</if>
|
||||
<if test="orderId != null">order_room_detail_id,
|
||||
</if>
|
||||
<if test="stayDate != null">stay_date,
|
||||
</if>
|
||||
<if test="roomCharge != null">room_charge,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},
|
||||
</if>
|
||||
<if test="orderRoomDetailId != null">#{orderRoomDetailId},
|
||||
</if>
|
||||
<if test="stayDate != null">#{stayDate},
|
||||
</if>
|
||||
<if test="roomCharge != null">#{roomCharge},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
</mapper>
|
@@ -0,0 +1,262 @@
|
||||
<?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.order.mapper.ZdyHotelHomestayOrderRoomDetailMapper">
|
||||
|
||||
<resultMap type="ZdyHotelHomestayOrderRoomDetail" id="ZdyHotelHomestayOrderRoomDetailResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="roomId" column="room_id"/>
|
||||
<result property="roomClassifyId" column="room_classify_id"/>
|
||||
<result property="roomCharge" column="room_charge"/>
|
||||
<result property="cancelRuleType" column="cancel_rule_type"/>
|
||||
<result property="cancelRuleContent" column="cancel_rule_content"/>
|
||||
<result property="roomStatusId" column="room_status_id"/>
|
||||
<result property="penaltyFee" column="penalty_fee"/>
|
||||
<result property="payAmount" column="pay_amount"/>
|
||||
<collection property="stayInfos" javaType="java.util.List" resultMap="StayInfoResult"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ZdyHotelHomestayOrderStayInfo" id="StayInfoResult">
|
||||
<result property="id" column="stay_info_id"/>
|
||||
<result property="orderId" column="stay_info_order_id"/>
|
||||
<result property="orderRoomDetailId" column="stay_info_order_room_detail_id"/>
|
||||
<result property="customerId" column="stay_info_customer_id"/>
|
||||
<result property="mobile" column="stay_info_mobile"/>
|
||||
<result property="idCard" column="stay_info_id_card"/>
|
||||
<result property="idCardType" column="stay_info_id_card_type"/>
|
||||
<result property="name" column="stay_info_name"/>
|
||||
<result property="processedBy" column="stay_info_processed_by"/>
|
||||
<result property="processingTime" column="stay_info_processing_time"/>
|
||||
<result property="idCardFrontPhoto" column="stay_info_id_card_front_photo"/>
|
||||
<result property="idCardBackPhoto" column="stay_info_id_card_back_photo"/>
|
||||
<result property="facePhoto" column="stay_info_face_photo"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyHotelHomestayOrderRoomDetailVo">
|
||||
select id,
|
||||
order_id,
|
||||
room_id,
|
||||
room_classify_id,
|
||||
room_charge,
|
||||
cancel_rule_type,
|
||||
cancel_rule_content,
|
||||
room_status_id,
|
||||
penalty_fee,
|
||||
pay_amount
|
||||
from zdy_hotel_homestay_order_room_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyHotelHomestayOrderRoomDetailList" parameterType="ZdyHotelHomestayOrderRoomDetail"
|
||||
resultMap="ZdyHotelHomestayOrderRoomDetailResult">
|
||||
<include refid="selectZdyHotelHomestayOrderRoomDetailVo"/>
|
||||
<where>
|
||||
<if test="orderId != null ">
|
||||
and order_id = #{orderId}
|
||||
</if>
|
||||
<if test="roomId != null ">
|
||||
and room_id = #{roomId}
|
||||
</if>
|
||||
<if test="roomClassifyId != null ">
|
||||
and room_classify_id = #{roomClassifyId}
|
||||
</if>
|
||||
<if test="roomCharge != null ">
|
||||
and room_charge = #{roomCharge}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyHotelHomestayOrderRoomDetailById" parameterType="Long"
|
||||
resultMap="ZdyHotelHomestayOrderRoomDetailResult">
|
||||
select zhhord.id,
|
||||
zhhord.order_id,
|
||||
zhhord.room_id,
|
||||
zhhord.room_classify_id,
|
||||
zhhord.room_charge,
|
||||
zhhord.cancel_rule_type,
|
||||
zhhord.cancel_rule_content,
|
||||
zhhord.room_status_id,
|
||||
zhhord.penalty_fee,
|
||||
zhhord.pay_amount
|
||||
from zdy_hotel_homestay_order_room_detail zhhord
|
||||
where zhhord.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyHotelHomestayOrderRoomDetail" parameterType="ZdyHotelHomestayOrderRoomDetail"
|
||||
useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_hotel_homestay_order_room_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,
|
||||
</if>
|
||||
<if test="roomId != null">room_id,
|
||||
</if>
|
||||
<if test="roomClassifyId != null">room_classify_id,
|
||||
</if>
|
||||
<if test="roomCharge != null">room_charge,
|
||||
</if>
|
||||
<if test="cancelRuleType != null">cancel_rule_type,
|
||||
</if>
|
||||
<if test="cancelRuleContent != null">cancel_rule_content,
|
||||
</if>
|
||||
<if test="roomStatusId != null">room_status_id,
|
||||
</if>
|
||||
<if test="penaltyFee != null">penalty_fee,
|
||||
</if>
|
||||
<if test="payAmount != null">pay_amount,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},
|
||||
</if>
|
||||
<if test="roomId != null">#{roomId},
|
||||
</if>
|
||||
<if test="roomClassifyId != null">#{roomClassifyId},
|
||||
</if>
|
||||
<if test="roomCharge != null">#{roomCharge},
|
||||
</if>
|
||||
<if test="cancelRuleType != null">#{cancelRuleType},
|
||||
</if>
|
||||
<if test="cancelRuleContent != null">#{cancelRuleContent},
|
||||
</if>
|
||||
<if test="roomStatusId != null">#{roomStatusId},
|
||||
</if>
|
||||
<if test="penaltyFee != null">#{penaltyFee},
|
||||
</if>
|
||||
<if test="payAmount != null">#{payAmount},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyHotelHomestayOrderRoomDetail" parameterType="ZdyHotelHomestayOrderRoomDetail">
|
||||
update zdy_hotel_homestay_order_room_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id =
|
||||
#{orderId},
|
||||
</if>
|
||||
<if test="roomId != null">room_id =
|
||||
#{roomId},
|
||||
</if>
|
||||
<if test="roomClassifyId != null">room_classify_id =
|
||||
#{roomClassifyId},
|
||||
</if>
|
||||
<if test="roomCharge != null">room_charge =
|
||||
#{roomCharge},
|
||||
</if>
|
||||
<if test="cancelRuleType != null">cancel_rule_type =
|
||||
#{cancelRuleType},
|
||||
</if>
|
||||
<if test="cancelRuleContent != null">cancel_rule_content =
|
||||
#{cancelRuleContent},
|
||||
</if>
|
||||
<if test="roomStatusId != null">room_status_id =
|
||||
#{roomStatusId},
|
||||
</if>
|
||||
<if test="penaltyFee != null">penalty_fee =
|
||||
#{penaltyFee},
|
||||
</if>
|
||||
<if test="payAmount != null">pay_amount =
|
||||
#{payAmount},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyHotelHomestayOrderRoomDetailById" parameterType="Long">
|
||||
delete
|
||||
from zdy_hotel_homestay_order_room_detail
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyHotelHomestayOrderRoomDetailByIds" parameterType="String">
|
||||
delete from zdy_hotel_homestay_order_room_detail where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getByOrderId" parameterType="Long" resultMap="ZdyHotelHomestayOrderRoomDetailResult">
|
||||
select zhhord.id,
|
||||
zhhord.order_id,
|
||||
zhhord.room_id,
|
||||
zhhord.room_classify_id,
|
||||
zhhord.room_charge,
|
||||
zhhord.cancel_rule_type,
|
||||
zhhord.cancel_rule_content,
|
||||
zhhord.room_status_id,
|
||||
zhhord.penalty_fee,
|
||||
zhhord.pay_amount,
|
||||
zhhosi.id as stay_info_id,
|
||||
zhhosi.order_id as stay_info_order_id,
|
||||
zhhosi.order_room_detail_id as stay_info_order_room_detail_id,
|
||||
zhhosi.customer_id as stay_info_customer_id,
|
||||
zhhosi.processed_by as stay_info_processed_by,
|
||||
zhhosi.processing_time as stay_info_processing_time,
|
||||
zhhosi.id_card_front_photo as stay_info_id_card_front_photo,
|
||||
zhhosi.id_card_back_photo as stay_info_id_card_back_photo,
|
||||
zhhosi.face_photo as stay_info_face_photo,
|
||||
zhhc.mobile as stay_info_mobile,
|
||||
zhhc.id_card as stay_info_id_card,
|
||||
zhhc.id_card_type as stay_info_id_card_type,
|
||||
zhhc.name as stay_info_name
|
||||
from zdy_hotel_homestay_order_room_detail zhhord
|
||||
left join zdy_hotel_homestay_order_stay_info zhhosi on zhhord.id = zhhosi.order_room_detail_id
|
||||
left join zdy_hotel_homestay_customer zhhc on zhhc.id = zhhosi.customer_id
|
||||
where zhhord.order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<select id="listRoomIdsByOrderId" parameterType="Long" resultMap="ZdyHotelHomestayOrderRoomDetailResult">
|
||||
select id, room_id, room_status_id
|
||||
from zdy_hotel_homestay_order_room_detail
|
||||
where order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<select id="listRoomStatusIdsByOrderId" parameterType="Long" resultType="Long">
|
||||
select room_status_id
|
||||
from zdy_hotel_homestay_order_room_detail
|
||||
where order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<update id="clearRoomStatusIdByOrderId" parameterType="Long">
|
||||
update zdy_hotel_homestay_order_room_detail
|
||||
set room_status_id = null
|
||||
where order_id = #{orderId}
|
||||
</update>
|
||||
|
||||
<select id="getByRoomStatusId" parameterType="Long" resultMap="ZdyHotelHomestayOrderRoomDetailResult">
|
||||
select zhhord.id,
|
||||
zhhord.order_id,
|
||||
zhhord.room_id,
|
||||
zhhord.room_classify_id,
|
||||
zhhord.room_charge,
|
||||
zhhord.cancel_rule_type,
|
||||
zhhord.cancel_rule_content,
|
||||
zhhord.room_status_id,
|
||||
zhhord.penalty_fee,
|
||||
zhhord.pay_amount,
|
||||
zhhosi.id as stay_info_id,
|
||||
zhhosi.order_id as stay_info_order_id,
|
||||
zhhosi.order_room_detail_id as stay_info_order_room_detail_id,
|
||||
zhhosi.customer_id as stay_info_customer_id,
|
||||
zhhosi.processed_by as stay_info_processed_by,
|
||||
zhhosi.processing_time as stay_info_processing_time,
|
||||
zhhosi.id_card_front_photo as stay_info_id_card_front_photo,
|
||||
zhhosi.id_card_back_photo as stay_info_id_card_back_photo,
|
||||
zhhosi.face_photo as stay_info_face_photo,
|
||||
zhhc.mobile as stay_info_mobile,
|
||||
zhhc.id_card as stay_info_id_card,
|
||||
zhhc.id_card_type as stay_info_id_card_type,
|
||||
zhhc.name as stay_info_name
|
||||
from zdy_hotel_homestay_order_room_detail zhhord
|
||||
left join zdy_hotel_homestay_order_stay_info zhhosi on zhhord.id = zhhosi.order_room_detail_id
|
||||
left join zdy_hotel_homestay_customer zhhc on zhhc.id = zhhosi.customer_id
|
||||
where zhhord.room_status_id = #{roomStatusId}
|
||||
</select>
|
||||
|
||||
<update id="clearRoomStatusIdById" parameterType="Long">
|
||||
update zdy_hotel_homestay_order_room_detail
|
||||
set room_status_id = null
|
||||
where id = #{id}
|
||||
</update>
|
||||
</mapper>
|
@@ -0,0 +1,119 @@
|
||||
<?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.order.mapper.ZdyHotelHomestayOrderStayInfoMapper">
|
||||
|
||||
<resultMap type="ZdyHotelHomestayOrderStayInfo" id="ZdyHotelHomestayOrderStayInfoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="orderRoomDetailId" column="order_room_detail_id"/>
|
||||
<result property="customerId" column="customer_id"/>
|
||||
<result property="mobile" column="mobile"/>
|
||||
<result property="idCard" column="id_card"/>
|
||||
<result property="idCardType" column="id_card_type"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="processedBy" column="processed_by"/>
|
||||
<result property="processingTime" column="processing_time"/>
|
||||
<result property="idCardFrontPhoto" column="id_card_front_photo"/>
|
||||
<result property="idCardBackPhoto" column="id_card_back_photo"/>
|
||||
<result property="facePhoto" column="face_photo"/>
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertZdyHotelHomestayOrderStayInfo" parameterType="ZdyHotelHomestayOrderStayInfo"
|
||||
useGeneratedKeys="true" keyProperty="id">
|
||||
insert into zdy_hotel_homestay_order_stay_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,
|
||||
</if>
|
||||
<if test="orderRoomDetailId != null">order_room_detail_id,
|
||||
</if>
|
||||
<if test="customerId != null">customer_id,
|
||||
</if>
|
||||
<if test="processedBy != null">processed_by,
|
||||
</if>
|
||||
<if test="processingTime != null">processing_time,
|
||||
</if>
|
||||
<if test="idCardFrontPhoto != null">id_card_front_photo,
|
||||
</if>
|
||||
<if test="idCardBackPhoto != null">id_card_back_photo,
|
||||
</if>
|
||||
<if test="facePhoto != null">face_photo,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},
|
||||
</if>
|
||||
<if test="orderRoomDetailId != null">#{orderRoomDetailId},
|
||||
</if>
|
||||
<if test="customerId != null">#{customerId},
|
||||
</if>
|
||||
<if test="processedBy != null">#{processedBy},
|
||||
</if>
|
||||
<if test="processingTime != null">#{processingTime},
|
||||
</if>
|
||||
<if test="idCardFrontPhoto != null">#{idCardFrontPhoto},
|
||||
</if>
|
||||
<if test="idCardBackPhoto != null">#{idCardBackPhoto},
|
||||
</if>
|
||||
<if test="facePhoto != null">#{facePhoto},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyHotelHomestayOrderStayInfo" parameterType="ZdyHotelHomestayOrderStayInfo">
|
||||
update zdy_hotel_homestay_order_stay_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id =
|
||||
#{orderId},
|
||||
</if>
|
||||
<if test="orderRoomDetailId != null">order_room_detail_id =
|
||||
#{orderRoomDetailId},
|
||||
</if>
|
||||
<if test="customerId != null">customer_id =
|
||||
#{customerId},
|
||||
</if>
|
||||
<if test="processedBy != null">processed_by =
|
||||
#{processedBy},
|
||||
</if>
|
||||
<if test="processingTime != null">processing_time =
|
||||
#{processingTime},
|
||||
</if>
|
||||
<if test="idCardFrontPhoto != null">id_card_front_photo =
|
||||
#{idCardFrontPhoto},
|
||||
</if>
|
||||
<if test="idCardBackPhoto != null">id_card_back_photo =
|
||||
#{idCardBackPhoto},
|
||||
</if>
|
||||
<if test="facePhoto != null">face_photo =
|
||||
#{facePhoto},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="listStayInfosByOrderId" parameterType="Long" resultMap="ZdyHotelHomestayOrderStayInfoResult">
|
||||
SELECT zhhosi.id,
|
||||
zhhosi.customer_id,
|
||||
zhhc.`name`,
|
||||
zhhc.mobile,
|
||||
zhhc.id_card,
|
||||
zhhc.id_card_type
|
||||
FROM zdy_hotel_homestay_order_stay_info zhhosi
|
||||
LEFT JOIN zdy_hotel_homestay_customer zhhc ON zhhc.id = zhhosi.customer_id
|
||||
WHERE zhhosi.order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<update id="updateProcessedInfoByOrderId" parameterType="ZdyHotelHomestayOrder">
|
||||
update zdy_hotel_homestay_order_stay_info
|
||||
set processed_by = #{processedBy},
|
||||
processing_time = #{processingTime}
|
||||
where order_id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="listCustomerIdsByOrderId" parameterType="Long" resultType="Long">
|
||||
SELECT customer_id
|
||||
FROM zdy_hotel_homestay_order_stay_info
|
||||
WHERE order_id = #{orderId}
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user