打印机列表添加筛选条件
This commit is contained in:
parent
7cad9078c5
commit
e1d6fae806
|
|
@ -36,7 +36,7 @@ public class PrintMachineController {
|
|||
*/
|
||||
@SaAdminCheckPermission(value = "printer:list", name = "打印机列表获取")
|
||||
@GetMapping
|
||||
public CzgResult<Page<PrintMachine>> list(String name, String connectionType) {
|
||||
public CzgResult<Page<PrintMachine>> list(String name, String connectionType, String subType) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper().eq(PrintMachine::getShopId, StpKit.USER.getShopId());
|
||||
if (StrUtil.isNotBlank(name)) {
|
||||
queryWrapper.like(PrintMachine::getName, name);
|
||||
|
|
@ -45,6 +45,10 @@ public class PrintMachineController {
|
|||
if (StrUtil.isNotBlank(connectionType)) {
|
||||
queryWrapper.eq(PrintMachine::getConnectionType, connectionType);
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(subType)) {
|
||||
queryWrapper.eq(PrintMachine::getSubType, subType);
|
||||
}
|
||||
queryWrapper.orderBy(PrintMachine::getSort, true).orderBy(PrintMachine::getId, false);
|
||||
return CzgResult.success(printMachineService.page(PageUtil.buildPage(), queryWrapper));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue