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