代客下单就餐模式判断
This commit is contained in:
parent
d7eaca4af2
commit
4e76bb2736
|
|
@ -0,0 +1,14 @@
|
|||
package cn.ysk.cashier.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum ShopInfoTypeEnums {
|
||||
MUNCHIES("munchies"),
|
||||
RESTAURANT("restaurant");
|
||||
private final String value;
|
||||
|
||||
ShopInfoTypeEnums(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
|
@ -11,6 +11,7 @@ import cn.ysk.cashier.cons.RedisConstant;
|
|||
import cn.ysk.cashier.cons.rabbit.RabbitConstants;
|
||||
import cn.ysk.cashier.dto.shoptable.*;
|
||||
import cn.ysk.cashier.enums.OrderUseTypeEnum;
|
||||
import cn.ysk.cashier.enums.ShopInfoTypeEnums;
|
||||
import cn.ysk.cashier.enums.ShopWxMsgTypeEnum;
|
||||
import cn.ysk.cashier.enums.TableStateEnum;
|
||||
import cn.ysk.cashier.exception.BadRequestException;
|
||||
|
|
@ -1004,7 +1005,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||
Integer mealNum = null;
|
||||
|
||||
boolean unAdd = cashierCarts.stream().noneMatch(item -> item.getPlaceNum() == null);
|
||||
if (addMaterId && unAdd && !OrderUseTypeEnum.TAKEOUT.getValue().equals(createOrderDTO.getUseType())) {
|
||||
if (ShopInfoTypeEnums.RESTAURANT.getValue().equals(shopInfo.getRegisterType()) && addMaterId && unAdd) {
|
||||
throw new BadRequestException("此次未添加新商品,清先添加商品");
|
||||
}
|
||||
for (TbCashierCart cashierCart : cashierCarts) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue