台桌列表 不分页

This commit is contained in:
2024-03-12 10:49:43 +08:00
parent 1d927f7fd2
commit 0dfa182c70
3 changed files with 20 additions and 2 deletions

View File

@@ -54,8 +54,8 @@ public class TbShopTableController {
@GetMapping @GetMapping
@Log("查询/shop/table") @Log("查询/shop/table")
@ApiOperation("查询/shop/table") @ApiOperation("查询/shop/table")
public ResponseEntity<Object> queryTbShopTable(TbShopTableQueryCriteria criteria, Pageable pageable){ public ResponseEntity<Object> queryTbShopTable(TbShopTableQueryCriteria criteria){
return new ResponseEntity<>(tbShopTableService.queryAll(criteria,pageable),HttpStatus.OK); return new ResponseEntity<>(tbShopTableService.queryAllNoPage(criteria),HttpStatus.OK);
} }
@PostMapping @PostMapping

View File

@@ -71,6 +71,22 @@ public class TbShopTableServiceImpl implements TbShopTableService {
return map; return map;
} }
@Override
public Map<String,Object> queryAllNoPage(TbShopTableQueryCriteria criteria){
if (criteria.getAreaId() != null || criteria.getAreaId() == 0) {
criteria.setAreaId(null);
}
List<TbShopTable> tbShopTableList = tbShopTableRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder));
for (TbShopTable date : tbShopTableList) {
if (!"".equals(date.getQrcode())){
date.setQrcode(QRCODE+date.getQrcode().trim());
}
}
HashMap<String, Object> map = new HashMap<>();
map.put("content",tbShopTableList);
return map;
}
@Override @Override
public List<TbShopTableDto> queryAll(TbShopTableQueryCriteria criteria){ public List<TbShopTableDto> queryAll(TbShopTableQueryCriteria criteria){
return tbShopTableMapper.toDto(tbShopTableRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); return tbShopTableMapper.toDto(tbShopTableRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));

View File

@@ -40,6 +40,8 @@ public interface TbShopTableService {
*/ */
Map<String,Object> queryAll(TbShopTableQueryCriteria criteria, Pageable pageable); Map<String,Object> queryAll(TbShopTableQueryCriteria criteria, Pageable pageable);
Map<String,Object> queryAllNoPage(TbShopTableQueryCriteria criteria);
/** /**
* 查询所有数据不分页 * 查询所有数据不分页
* @param criteria 条件参数 * @param criteria 条件参数