预约端 接口
This commit is contained in:
@@ -27,7 +27,7 @@ import java.util.Set;
|
||||
* @description
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/admin/bk/notify")
|
||||
@RequestMapping("/admin/bk/")
|
||||
@Slf4j
|
||||
public class BkContactListController {
|
||||
|
||||
|
||||
@@ -11,18 +11,22 @@ import java.util.List;
|
||||
@Data
|
||||
public class BkTableVO {
|
||||
private Long areaId;
|
||||
|
||||
private String areaName;
|
||||
private List<TableVO> tables;
|
||||
|
||||
private List<BkTableVO.TableVO> tables;
|
||||
|
||||
record TableVO(
|
||||
Long tableId,String tableName, List<BkOrder> bkOrders
|
||||
) {
|
||||
@Data
|
||||
public static class TableVO {
|
||||
private Long tableId;
|
||||
private String tableName;
|
||||
private List<BkOrder> bkOrders;
|
||||
}
|
||||
|
||||
record BkOrder(
|
||||
String callPhone, String callUsername, String bookingPhone, String bookingUsername, String bookingTime
|
||||
) {
|
||||
@Data
|
||||
public static class BkOrder {
|
||||
private String callPhone;
|
||||
private String callUsername;
|
||||
private String bookingPhone;
|
||||
private String bookingUsername;
|
||||
private String bookingTime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
<!-- 嵌套集合:桌台列表 -->
|
||||
<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" javaType="java.util.List">
|
||||
|
||||
<!-- 嵌套集合:订单列表 -->
|
||||
<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>
|
||||
</collection>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user