From c9cbc0947f6fe578d1f178d73a2dd46d95bec275 Mon Sep 17 00:00:00 2001 From: wang-hao-jie <1550036656@qq.com> Date: 星期一, 07 二月 2022 08:40:22 +0800 Subject: [PATCH] 违章记录 --- xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CustomerController.java | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CustomerController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CustomerController.java index 3d69f0b..445dcd3 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CustomerController.java +++ b/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); } @@ -84,16 +83,25 @@ 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); } -- Gitblit v1.9.1