From beb5929ea5ac874f256fce08a679a674ef02868a Mon Sep 17 00:00:00 2001 From: Oliver <1070107765@qq.com> Date: 星期三, 09 十一月 2022 16:21:08 +0800 Subject: [PATCH] bug修改 --- ycl-platform/src/main/java/com/ycl/controller/region/SccgRegionController.java | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/ycl-platform/src/main/java/com/ycl/controller/region/SccgRegionController.java b/ycl-platform/src/main/java/com/ycl/controller/region/SccgRegionController.java index d8bb664..c262b31 100644 --- a/ycl-platform/src/main/java/com/ycl/controller/region/SccgRegionController.java +++ b/ycl-platform/src/main/java/com/ycl/controller/region/SccgRegionController.java @@ -7,7 +7,9 @@ import com.ycl.api.CommonResult; import com.ycl.controller.BaseController; import com.ycl.entity.region.SccgRegion; +import com.ycl.service.redis.RedisService; import com.ycl.service.region.ISccgRegionService; +import com.ycl.utils.redis.RedisKey; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -32,6 +34,9 @@ public class SccgRegionController extends BaseController { @Resource + private RedisService redisService; + + @Resource private ISccgRegionService iSccgRegionService; @ApiOperation("鏍戠粨鏋�") @@ -45,6 +50,7 @@ @RequestMapping(value = "/addRegion", method = RequestMethod.POST) @ResponseBody public CommonResult addRegion(@Validated @RequestBody SccgRegion sccgRegion) { + redisService.del(RedisKey.SCCG_REGION); return CommonResult.success(iSccgRegionService.save(sccgRegion)); } @@ -70,6 +76,7 @@ @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody SccgRegion sccgRegion) { + redisService.del(RedisKey.SCCG_REGION); sccgRegion.setId(id); boolean success = iSccgRegionService.updateById(sccgRegion); if (success) { @@ -82,6 +89,7 @@ @RequestMapping(value = "/delete", method = RequestMethod.POST) @ResponseBody public CommonResult delete(@RequestParam("ids") List<Long> ids) { + redisService.del(RedisKey.SCCG_REGION); boolean success = iSccgRegionService.removeBatchByIds(ids); if (success) { return CommonResult.success(null); -- Gitblit v1.8.0