台桌列表接口修改
This commit is contained in:
parent
298a05cd9c
commit
c024d83309
|
|
@ -13,6 +13,7 @@ import com.czg.resp.CzgResult;
|
||||||
import com.czg.sa.StpKit;
|
import com.czg.sa.StpKit;
|
||||||
import com.czg.utils.PageUtil;
|
import com.czg.utils.PageUtil;
|
||||||
import com.mybatisflex.core.paginate.Page;
|
import com.mybatisflex.core.paginate.Page;
|
||||||
|
import com.mybatisflex.core.query.QueryMethods;
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
@ -54,7 +55,7 @@ public class ShopTableController {
|
||||||
*/
|
*/
|
||||||
@SaAdminCheckPermission("shopTable:list")
|
@SaAdminCheckPermission("shopTable:list")
|
||||||
@GetMapping
|
@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());
|
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);
|
||||||
|
|
@ -67,6 +68,10 @@ public class ShopTableController {
|
||||||
if (StrUtil.isNotBlank(status)) {
|
if (StrUtil.isNotBlank(status)) {
|
||||||
queryWrapper.eq(ShopTable::getStatus, status);
|
queryWrapper.eq(ShopTable::getStatus, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(name)) {
|
||||||
|
queryWrapper.like(ShopTable::getName, name);
|
||||||
|
}
|
||||||
return CzgResult.success(shopTableService.page(PageUtil.buildPage(), queryWrapper));
|
return CzgResult.success(shopTableService.page(PageUtil.buildPage(), queryWrapper));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue