| | |
| | | |
| | | @RequestMapping(value = "/getByPage", method = RequestMethod.GET) |
| | | @ApiOperation(value = "分页获取") |
| | | public Result<IPage<CustomerReceive>> getByPage(PageVo page) { |
| | | |
| | | IPage<CustomerReceive> data = iCustomerReceiveService.page(PageUtil.initMpPage(page)); |
| | | public Result<IPage<CustomerReceive>> getByPage(String name,PageVo page) { |
| | | QueryWrapper<CustomerReceive> wrapper = new QueryWrapper<>(); |
| | | if (!StrUtil.isEmpty(name)) |
| | | wrapper.like("b.name","%"+name+"%"); |
| | | IPage<CustomerReceive> data = iCustomerReceiveService.page2(PageUtil.initMpPage(page),wrapper); |
| | | return new ResultUtil<IPage<CustomerReceive>>().setData(data); |
| | | } |
| | | |
| | |
| | | return new ResultUtil<CustomerReceive>().setErrorMsg("操作失败"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/update", method = RequestMethod.POST) |
| | | @ApiOperation(value = "修改头像") |
| | | public Result<CustomerReceive> update(String id,String imgUrl) { |
| | | CustomerReceive customerReceive = iCustomerReceiveService.getById(id); |
| | | customerReceive.setImg(imgUrl); |
| | | if (iCustomerReceiveService.saveOrUpdate(customerReceive)) { |
| | | return new ResultUtil<CustomerReceive>().setData(customerReceive); |
| | | } |
| | | return new ResultUtil<CustomerReceive>().setErrorMsg("操作失败"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/delByIds", method = RequestMethod.POST) |
| | | @ApiOperation(value = "批量通过id删除") |
| | | public Result<Object> delAllByIds(@RequestParam String[] ids) { |