|
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
6
|
6
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
7
|
7
|
import com.yunzhi.marketing.base.BaseController;
|
8
|
8
|
import com.yunzhi.marketing.base.ResponseBean;
|
|
9
|
+import com.yunzhi.marketing.common.StringUtils;
|
9
|
10
|
import com.yunzhi.marketing.entity.TaBuilding;
|
10
|
11
|
import com.yunzhi.marketing.service.ITaBuildingService;
|
11
|
12
|
import com.yunzhi.marketing.xlk.dto.BrandDTO;
|
|
@@ -61,13 +62,16 @@ public class BrandController extends BaseController {
|
61
|
62
|
@ApiOperation(value = "admin-品牌开发商表列表", notes = "admin-品牌开发商表列表")
|
62
|
63
|
@RequestMapping(value="/admin/brand",method= RequestMethod.GET)
|
63
|
64
|
public ResponseBean brandList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
64
|
|
- @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize, @RequestHeader("authorization") String token,HttpServletRequest request){
|
|
65
|
+ @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
|
66
|
+ @RequestParam(value ="brandName",required = false) String brandName,
|
|
67
|
+ @RequestHeader("authorization") String token,HttpServletRequest request){
|
65
|
68
|
ResponseBean responseBean = new ResponseBean();
|
66
|
69
|
try {
|
67
|
70
|
|
68
|
71
|
IPage<Brand> pg = new Page<>(pageNum, pageSize);
|
69
|
72
|
LambdaQueryWrapper<Brand> queryWrapper = new LambdaQueryWrapper<>();
|
70
|
73
|
queryWrapper.eq(Brand::getOrgId,getOrgId(request));
|
|
74
|
+ queryWrapper.like(!StringUtils.isEmpty(brandName),Brand::getBrandName,brandName);
|
71
|
75
|
queryWrapper.orderByDesc(Brand::getCreatedTime);
|
72
|
76
|
|
73
|
77
|
IPage<Brand> result = iBrandService.page(pg, queryWrapper);
|