wang-hao-jie
2022-01-18 d9da603305a2b94bde78483fa8777a43ee352548
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CustomerController.java
@@ -56,14 +56,13 @@
    }
    @RequestMapping(value = "/getByPage", method = RequestMethod.GET)
    @ApiOperation(value = "" +
            "")
    public Result<IPage<Customer>> getByPage(String areaSectionId,String name,PageVo page) {
    @ApiOperation(value = "")
    public Result<IPage<Customer>> getByPage(String areaSectionId,String customerName,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+"%");
        if (!StrUtil.isEmpty(customerName))
            wrapper.like("name", "%" + customerName + "%");
        IPage<Customer> data = iCustomerService.page(PageUtil.initMpPage(page),wrapper);
        return new ResultUtil<IPage<Customer>>().setData(data);
    }