From bb9e715070365b8c78e9d8ebd57a084d46921661 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Sun, 7 Apr 2024 14:19:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=88=96=E8=80=85?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BB=93=E5=BA=93=E4=BA=86=E4=BB=A5=E5=90=8E?= =?UTF-8?q?=E6=B8=85=E9=99=A4=E4=BB=93=E5=BA=93=E5=88=97=E8=A1=A8=E7=BC=93?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BasicdataWarehouseController.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java index 48cf0b0ec..b3000cbe9 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java @@ -31,6 +31,7 @@ import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import lombok.extern.log4j.Log4j2; +import org.springblade.common.cache.CacheNames; import org.springblade.common.cache.CacheObjNames; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.cache.utils.CacheUtil; @@ -211,7 +212,12 @@ public class BasicdataWarehouseController extends BladeController { public R submit(@Valid @RequestBody BasicdataWarehouseEntity warehouseWarehouse) { BladeUser user = AuthUtil.getUser(); CacheUtil.evict(CacheObjNames.basic_data_warehourse_list.getCacheName(), CacheObjNames.basic_data_warehourse_list.getKeyPrefix(),user.getUserId()); - return R.status(warehouseService.saveOrUpdate(warehouseWarehouse)); + boolean b = warehouseService.saveOrUpdate(warehouseWarehouse); + if(b){ + // 清除缓存 + bladeRedis.del(CacheNames.tenantKeyObj(user.getTenantId(), CacheNames.USER_WAREHOUSE_OWN, user.getUserId())); + } + return R.status(b); } /**