台桌列表接口修改

This commit is contained in:
张松
2025-02-19 15:35:05 +08:00
parent 90788acc58
commit 298a05cd9c

View File

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