台桌列表 不分页
This commit is contained in:
@@ -54,8 +54,8 @@ public class TbShopTableController {
|
||||
@GetMapping
|
||||
@Log("查询/shop/table")
|
||||
@ApiOperation("查询/shop/table")
|
||||
public ResponseEntity<Object> queryTbShopTable(TbShopTableQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopTableService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
public ResponseEntity<Object> queryTbShopTable(TbShopTableQueryCriteria criteria){
|
||||
return new ResponseEntity<>(tbShopTableService.queryAllNoPage(criteria),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
|
||||
@@ -71,6 +71,22 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||
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
|
||||
public List<TbShopTableDto> queryAll(TbShopTableQueryCriteria criteria){
|
||||
return tbShopTableMapper.toDto(tbShopTableRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
|
||||
|
||||
@@ -40,6 +40,8 @@ public interface TbShopTableService {
|
||||
*/
|
||||
Map<String,Object> queryAll(TbShopTableQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
Map<String,Object> queryAllNoPage(TbShopTableQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria 条件参数
|
||||
|
||||
Reference in New Issue
Block a user