打印机 单开
支付 就餐模式
This commit is contained in:
@@ -60,6 +60,31 @@ public class PrintMachineController {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user