打印机 单开
支付 就餐模式
This commit is contained in:
@@ -60,6 +60,31 @@ public class PrintMachineController {
|
|||||||
return CzgResult.success(page);
|
return CzgResult.success(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印机列表
|
||||||
|
* @param name 名称
|
||||||
|
* @return 打印机列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/getPrintLocal")
|
||||||
|
public CzgResult<Page<PrintMachine>> getPrintLocal(String name, String subType) {
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper().eq(PrintMachine::getShopId, StpKit.USER.getShopId());
|
||||||
|
if (StrUtil.isNotBlank(name)) {
|
||||||
|
queryWrapper.like(PrintMachine::getName, name);
|
||||||
|
}
|
||||||
|
queryWrapper.in(PrintMachine::getConnectionType, "USB", "局域网");
|
||||||
|
if (StrUtil.isNotBlank(subType)) {
|
||||||
|
queryWrapper.eq(PrintMachine::getSubType, subType);
|
||||||
|
}
|
||||||
|
queryWrapper.orderBy(PrintMachine::getSort, true).orderBy(PrintMachine::getId, false);
|
||||||
|
Page<PrintMachine> page = printMachineService.page(PageUtil.buildPage(), queryWrapper);
|
||||||
|
page.getRecords().forEach(item -> {
|
||||||
|
if (StrUtil.isNotBlank(item.getCategoryIds())) {
|
||||||
|
item.setCategoryList(JSONArray.parse(item.getCategoryIds()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return CzgResult.success(page);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 打印机详情
|
* 打印机详情
|
||||||
* @param id 打印机id
|
* @param id 打印机id
|
||||||
|
|||||||
@@ -33,6 +33,11 @@ public class CheckOrderPay implements Serializable {
|
|||||||
private boolean withCoupon = true;
|
private boolean withCoupon = true;
|
||||||
private boolean withPoints = true;
|
private boolean withPoints = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用餐模式 堂食 dine-in 外带 take-out 外卖 take-away
|
||||||
|
*/
|
||||||
|
private String dineMode;
|
||||||
|
|
||||||
@NotNull(message = "订单id不可为空")
|
@NotNull(message = "订单id不可为空")
|
||||||
private Long orderId;
|
private Long orderId;
|
||||||
|
|
||||||
|
|||||||
@@ -362,6 +362,9 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
|
|||||||
throw new OrderCancelException("订单已过期,请重新下单");
|
throw new OrderCancelException("订单已过期,请重新下单");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (StrUtil.isNotBlank(param.getDineMode())) {
|
||||||
|
orderInfo.setDineMode(param.getDineMode());
|
||||||
|
}
|
||||||
ShopInfo shopInfo = shopInfoService.getById(orderInfo.getShopId());
|
ShopInfo shopInfo = shopInfoService.getById(orderInfo.getShopId());
|
||||||
AssertUtil.isNull(shopInfo, "生成订单失败,店铺信息不存在");
|
AssertUtil.isNull(shopInfo, "生成订单失败,店铺信息不存在");
|
||||||
if (param.isVipPrice() && !shopInfo.getIsMemberPrice().equals(1)) {
|
if (param.isVipPrice() && !shopInfo.getIsMemberPrice().equals(1)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user