台桌列表接口修改

This commit is contained in:
张松 2025-02-19 15:35:05 +08:00
parent 90788acc58
commit 298a05cd9c
1 changed files with 6 additions and 1 deletions

View File

@ -49,11 +49,12 @@ public class ShopTableController {
* 权限标识: shopTable:list
* @param areaId 区域id
* @param tableCode 桌码
* @param status 台桌状态
* @return 台桌列表
*/
@SaAdminCheckPermission("shopTable:list")
@GetMapping
public CzgResult<Page<ShopTable>> list(Integer areaId, String tableCode) {
public CzgResult<Page<ShopTable>> list(Integer areaId, String tableCode, String status) {
QueryWrapper queryWrapper = new QueryWrapper().eq(ShopTable::getShopId, StpKit.USER.getShopId());
if (areaId != null) {
queryWrapper.eq(ShopTable::getAreaId, areaId);
@ -62,6 +63,10 @@ public class ShopTableController {
if (StrUtil.isNotBlank(tableCode)) {
queryWrapper.like(ShopTable::getTableCode, tableCode);
}
if (StrUtil.isNotBlank(status)) {
queryWrapper.eq(ShopTable::getStatus, status);
}
return CzgResult.success(shopTableService.page(PageUtil.buildPage(), queryWrapper));
}