| | |
| | | @ApiOperation(value = "修改", notes = "传入region") |
| | | @ApiLog("行政区划数据修改") |
| | | public R update(@Valid @RequestBody Region region) { |
| | | region.setUpdateTime(DateUtil.now()); |
| | | return R.status(regionService.updateById(region)); |
| | | } |
| | | |
| | |
| | | @ApiLog("行政区划数据新增或修改") |
| | | public R submit(@Valid @RequestBody RegionAddParam region) { |
| | | Region regionEntity = Objects.requireNonNull(BeanUtil.copy(region, Region.class)); |
| | | regionEntity.setUpdateTime(DateUtil.now()); |
| | | regionEntity.setCreateTime(DateUtil.now()); |
| | | return R.status(regionService.submit(regionEntity)); |
| | | } |
| | | |