| | |
| | | } |
| | | |
| | | @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); |
| | | } |
| | |
| | | Customer customer = iCustomerService.getById(customerId); |
| | | if(StrUtil.isNotEmpty(lng)){ |
| | | customer.setLng(lng); |
| | | }else{ |
| | | return ResultUtil.error("请将信息填写完整"); |
| | | } |
| | | if(StrUtil.isNotEmpty(lat)){ |
| | | customer.setLat(lat); |
| | | }else{ |
| | | return ResultUtil.error("请将信息填写完整"); |
| | | } |
| | | if(StrUtil.isNotEmpty(address)){ |
| | | customer.setRegisteredAddress(address); |
| | | }else{ |
| | | return ResultUtil.error("请将信息填写完整"); |
| | | } |
| | | if(StrUtil.isNotEmpty(headImg)){ |
| | | customer.setHeadImg(headImg); |
| | | }else{ |
| | | return ResultUtil.error("请将信息填写完整"); |
| | | } |
| | | customer.setKstatus(2); |
| | | if (iCustomerService.saveOrUpdate(customer)) { |
| | | return new ResultUtil<Customer>().setData(customer); |
| | | } |