台桌预订改造
This commit is contained in:
@@ -53,6 +53,15 @@ public class TbShopTableQueryCriteria{
|
|||||||
private Integer page = 1;
|
private Integer page = 1;
|
||||||
private Integer size = 99999;
|
private Integer size = 99999;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预约日期 yyyy-MM-dd
|
||||||
|
*/
|
||||||
|
private String bookingDate;
|
||||||
|
/**
|
||||||
|
* 预约类型 lunch-午餐 dinner-晚餐
|
||||||
|
*/
|
||||||
|
private String bookingType;
|
||||||
|
|
||||||
public Integer getIsPredate() {
|
public Integer getIsPredate() {
|
||||||
return isPredate;
|
return isPredate;
|
||||||
}
|
}
|
||||||
@@ -60,4 +69,5 @@ public class TbShopTableQueryCriteria{
|
|||||||
public void setIsPredate(Integer isPredate) {
|
public void setIsPredate(Integer isPredate) {
|
||||||
this.isPredate = isPredate;
|
this.isPredate = isPredate;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -334,16 +334,20 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||||||
itemMap.put("orderId", orderInfo == null ? null : orderInfo.getId());
|
itemMap.put("orderId", orderInfo == null ? null : orderInfo.getId());
|
||||||
itemMap.put("useType", orderInfo == null ? null : orderInfo.getUseType());
|
itemMap.put("useType", orderInfo == null ? null : orderInfo.getUseType());
|
||||||
itemMap.put("masterId", orderInfo == null ? null : orderInfo.getMasterId());
|
itemMap.put("masterId", orderInfo == null ? null : orderInfo.getMasterId());
|
||||||
|
String bookingDate = StrUtil.blankToDefault(criteria.getBookingDate(), DateUtil.today());
|
||||||
|
String bookingType = StrUtil.blankToDefault(criteria.getBookingType(), "lunch");
|
||||||
LambdaQueryWrapper<TbShopTableBooking> wrapper = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<TbShopTableBooking> wrapper = Wrappers.lambdaQuery();
|
||||||
wrapper.eq(TbShopTableBooking::getBookingDate, DateUtil.today());
|
wrapper.eq(TbShopTableBooking::getBookingDate, bookingDate);
|
||||||
|
wrapper.eq(TbShopTableBooking::getBookingType, bookingType);
|
||||||
wrapper.eq(TbShopTableBooking::getShopTableId, data.getId());
|
wrapper.eq(TbShopTableBooking::getShopTableId, data.getId());
|
||||||
wrapper.ne(TbShopTableBooking::getStatus, -1);
|
wrapper.ne(TbShopTableBooking::getStatus, -1);
|
||||||
wrapper.eq(TbShopTableBooking::getDelFlag, 0);
|
wrapper.eq(TbShopTableBooking::getDelFlag, 0);
|
||||||
List<TbShopTableBooking> list = tbShopTableBookingService.list(wrapper);
|
List<TbShopTableBooking> list = tbShopTableBookingService.list(wrapper);
|
||||||
if (list == null) {
|
TbShopTableBooking bookingInfo = null;
|
||||||
list = new ArrayList<>();
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
|
bookingInfo = list.get(0);
|
||||||
}
|
}
|
||||||
itemMap.put("bookingList", list);
|
itemMap.put("bookingInfo", bookingInfo);
|
||||||
infoList.add(itemMap);
|
infoList.add(itemMap);
|
||||||
}
|
}
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user