台桌列表接口修改

This commit is contained in:
张松 2025-02-19 15:47:03 +08:00
parent 298a05cd9c
commit c024d83309
1 changed files with 6 additions and 1 deletions

View File

@ -13,6 +13,7 @@ import com.czg.resp.CzgResult;
import com.czg.sa.StpKit;
import com.czg.utils.PageUtil;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryMethods;
import com.mybatisflex.core.query.QueryWrapper;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
@ -54,7 +55,7 @@ public class ShopTableController {
*/
@SaAdminCheckPermission("shopTable:list")
@GetMapping
public CzgResult<Page<ShopTable>> list(Integer areaId, String tableCode, String status) {
public CzgResult<Page<ShopTable>> list(Integer areaId, String tableCode, String status, String name) {
QueryWrapper queryWrapper = new QueryWrapper().eq(ShopTable::getShopId, StpKit.USER.getShopId());
if (areaId != null) {
queryWrapper.eq(ShopTable::getAreaId, areaId);
@ -67,6 +68,10 @@ public class ShopTableController {
if (StrUtil.isNotBlank(status)) {
queryWrapper.eq(ShopTable::getStatus, status);
}
if (StrUtil.isNotBlank(name)) {
queryWrapper.like(ShopTable::getName, name);
}
return CzgResult.success(shopTableService.page(PageUtil.buildPage(), queryWrapper));
}