|
|
|
@ -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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|