预约端 接口
This commit is contained in:
@@ -27,13 +27,11 @@
|
||||
FROM
|
||||
`tb_shop_table` `table`
|
||||
LEFT JOIN tb_shop_table_area `area` on `table`.area_id = `area`.id
|
||||
LEFT JOIN bk_order `order` ON `table`.shop_id = `order`.shop_id
|
||||
AND DATE(`order`.booking_time) = #{day}
|
||||
LEFT JOIN bk_order_table oTable on `table`.id = oTable.table_id
|
||||
LEFT JOIN bk_order `order` ON oTable.book_order_id = `order`.id AND DATE(`order`.booking_time) = #{day}
|
||||
<if test="seatTimeType != null and seatTimeType != ''">
|
||||
AND `order`.seat_time_type = #{seatTimeType}
|
||||
</if>
|
||||
LEFT JOIN bk_order_table oTable on oTable.book_order_id = `order`.id
|
||||
and `table`.id = oTable.table_id
|
||||
WHERE
|
||||
`table`.shop_id = #{shopId}
|
||||
AND `table`.`status` != 'unbound'
|
||||
@@ -43,21 +41,27 @@
|
||||
ORDER BY `table`.area_id, `table`.id
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<resultMap id="BkTableVOResultMap" type="com.czg.account.vo.BkTableVO">
|
||||
<result property="areaId" column="area_id"/>
|
||||
<!-- 区域级别映射 -->
|
||||
<id property="areaId" column="area_id"/>
|
||||
<result property="areaName" column="area_name"/>
|
||||
<collection property="tables" ofType="com.czg.account.vo.BkTableVO$TableVO" javaType="java.util.List">
|
||||
<result property="tableId" column="table_id"/>
|
||||
<result property="tableName" column="table_name"/>
|
||||
<collection property="bkOrders" ofType="com.czg.account.vo.BkTableVO$BkOrder" javaType="java.util.List">
|
||||
<result property="callPhone" column="call_phone"/>
|
||||
<result property="callUsername" column="call_username"/>
|
||||
<result property="bookingPhone" column="booking_phone"/>
|
||||
<result property="bookingUsername" column="booking_username"/>
|
||||
<result property="bookingTime" column="booking_time"/>
|
||||
</collection>
|
||||
|
||||
<!-- 嵌套集合:桌台列表 -->
|
||||
<collection property="tables" ofType="com.czg.account.vo.BkTableVO$TableVO" resultMap="tableVOResultMap"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="tableVOResultMap" type="com.czg.account.vo.BkTableVO$TableVO">
|
||||
<!-- 桌台级别映射 -->
|
||||
<id property="tableId" column="table_id"/>
|
||||
<result property="tableName" column="table_name"/>
|
||||
|
||||
<!-- 嵌套集合:订单列表 -->
|
||||
<collection property="bkOrders" ofType="com.czg.account.vo.BkTableVO$BkOrder">
|
||||
<result property="callPhone" column="call_phone"/>
|
||||
<result property="callUsername" column="call_username"/>
|
||||
<result property="bookingPhone" column="booking_phone"/>
|
||||
<result property="bookingUsername" column="booking_username"/>
|
||||
<result property="bookingTime" column="booking_time"/>
|
||||
</collection>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user