zhangzeli
2021-11-08 74d7aed668f67adea64ba507373b58b86fffd100
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CustomerController.java
@@ -50,10 +50,12 @@
    @RequestMapping(value = "/getByPage", method = RequestMethod.GET)
    @ApiOperation(value = "" +
            "")
    public Result<IPage<Customer>> getByPage(String areaSectionId,PageVo page) {
    public Result<IPage<Customer>> getByPage(String areaSectionId,String name,PageVo page) {
        QueryWrapper<Customer> wrapper = new QueryWrapper<>();
        if (!StrUtil.isEmpty(areaSectionId))
            wrapper.eq("area_section_id",areaSectionId);
        if (!StrUtil.isEmpty(name))
            wrapper.like("name","%"+name+"%");
        IPage<Customer> data = iCustomerService.page(PageUtil.initMpPage(page),wrapper);
        return new ResultUtil<IPage<Customer>>().setData(data);
    }