HotelOrderProcedureMapper.xml
1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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.sibu.orderHelper.base.dao.IMWebRoomOrderProcedureDao">
<!-- orderProcedure List -->
<resultMap type="com.sibu.orderHelper.hotel.model.RoomOrderProcedureBean" id="orderProcedureList">
<id column="procedure_id" property="procedureId" javaType="java.lang.Integer" jdbcType="BIGINT"/>
<result column="sub_order_id" property="subOrderId" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="order_id" property="orderId" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="operator_msg" property="operatorMsg" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="operator_date" property="operatorDate" javaType="java.util.Date" jdbcType="TIMESTAMP"/>
</resultMap>
<!-- 查询客栈订单列表 -->
<select id="selectOrderProcedureBySubOrderId" parameterType="java.lang.String" resultMap="orderProcedureList">
SELECT
procedure_id,
sub_order_id,
order_id,
operator_msg,
operator_date
FROM
room_order_procedure
where sub_order_id=#{subOrderId}
</select>
<!-- 保存订订单操作日志 -->
<insert id="save" parameterType="com.sibu.orderHelper.hotel.model.RoomOrderProcedureBean">
insert into room_order_procedure
(
sub_order_id ,
order_id ,
operator_msg
)
value(
#{subOrderId},
#{orderId},
#{operatorMsg}
);
</insert>
<insert id="saveSubOrdersProcedure" parameterType="java.util.List">
<![CDATA[
insert into room_order_procedure
(
sub_order_id ,
order_id ,
operator_msg
)
values
]]>
<foreach collection="ordersProcedures" item="item" index="index" separator="," >
( #{item.subOrderId},
#{item.orderId},
#{item.operatorMsg}
)
</foreach>
</insert>
</mapper>