就餐模式获取修改
This commit is contained in:
@@ -27,7 +27,6 @@ public class ShopUtils {
|
|||||||
* @return 就餐类型信息
|
* @return 就餐类型信息
|
||||||
*/
|
*/
|
||||||
public ShopEatTypeInfoDTO checkEatModel(String tableId, Object shopId) {
|
public ShopEatTypeInfoDTO checkEatModel(String tableId, Object shopId) {
|
||||||
String eatModel = StrUtil.isBlank(tableId) ? ShopInfoEatModelEnum.TAKE_OUT.getValue() : ShopInfoEatModelEnum.DINE_IN.getValue();
|
|
||||||
|
|
||||||
TbShopInfo shopInfo = mpShopInfoMapper.selectOne(new LambdaQueryWrapper<TbShopInfo>()
|
TbShopInfo shopInfo = mpShopInfoMapper.selectOne(new LambdaQueryWrapper<TbShopInfo>()
|
||||||
.eq(TbShopInfo::getId, shopId)
|
.eq(TbShopInfo::getId, shopId)
|
||||||
@@ -36,13 +35,15 @@ public class ShopUtils {
|
|||||||
throw new MsgException("店铺信息不存在");
|
throw new MsgException("店铺信息不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean isOpenTakeout = shopInfo.getEatModel().contains(ShopInfoEatModelEnum.TAKE_OUT.getValue());
|
||||||
|
boolean isOpenDineIn = shopInfo.getEatModel().contains(ShopInfoEatModelEnum.DINE_IN.getValue());
|
||||||
|
tableId = isOpenDineIn ? tableId : null;
|
||||||
|
String eatModel = StrUtil.isBlank(tableId) ? ShopInfoEatModelEnum.TAKE_OUT.getValue() : ShopInfoEatModelEnum.DINE_IN.getValue();
|
||||||
|
|
||||||
if (!shopInfo.getEatModel().contains(eatModel)) {
|
if (!shopInfo.getEatModel().contains(eatModel)) {
|
||||||
throw new MsgException("当前店铺未开启此就餐模式");
|
throw new MsgException("当前店铺未开启此就餐模式");
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isOpenTakeout = shopInfo.getEatModel().contains(ShopInfoEatModelEnum.TAKE_OUT.getValue());
|
|
||||||
boolean isOpenDineIn = shopInfo.getEatModel().contains(ShopInfoEatModelEnum.DINE_IN.getValue());
|
|
||||||
|
|
||||||
boolean isTakeout = ShopInfoEatModelEnum.TAKE_OUT.getValue().equals(eatModel);
|
boolean isTakeout = ShopInfoEatModelEnum.TAKE_OUT.getValue().equals(eatModel);
|
||||||
// 是否是快餐版/先付费
|
// 是否是快餐版/先付费
|
||||||
boolean isMunchies = StrUtil.isNotBlank(shopInfo.getRegisterType()) &&
|
boolean isMunchies = StrUtil.isNotBlank(shopInfo.getRegisterType()) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user