diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataWarehouseClient.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataWarehouseClient.java index 3b0692270..94b62c882 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataWarehouseClient.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataWarehouseClient.java @@ -165,46 +165,44 @@ public class BasicdataWarehouseClient implements IBasicdataWarehouseClient { return warehouseWarehouseService.clearWarehouseCache(); } - @Override - @GetMapping(WAREHOUSEBYDEPARTMENT) - public BasicdataWarehouseEntity getWarehouseByDepartment(String deptId) { - - - - String key =RedisKeyConstant.BASIC_DATA_WAREHOUSE_LIST_KEY + deptId; - BasicdataWarehouseEntity o = bladeRedis.get(key); - log.info(">>> 获取的仓库的信息 o ={}",o); - if(ObjectUtils.isNull(o)){ - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("department",deptId) - .eq("is_deleted",0) - .eq("enable_status",2); - List list = warehouseWarehouseService.list(queryWrapper); - if(!Objects.isNull(list) && !list.isEmpty()){ - - // 寻找中心仓 - for (BasicdataWarehouseEntity basicdataWarehouseEntity : list) { - if("2".equals(basicdataWarehouseEntity.getFunctionType())){ - o = basicdataWarehouseEntity; - } - } - // 找不到 就去第一个 - if(ObjectUtils.isNull(o)){ - o= list.get(0); - } - - // 设定缓存时间 1小时的缓存时间 - bladeRedis.setEx(key,o, 60 * 60L); - } - - } - - return o; - - - - } +// @Override +// @GetMapping(WAREHOUSEBYDEPARTMENT) +// public BasicdataWarehouseEntity getWarehouseByDepartment(String deptId) { +// String key =RedisKeyConstant.BASIC_DATA_WAREHOUSE_LIST_KEY + deptId; +// BasicdataWarehouseEntity o = bladeRedis.get(key); +// log.info(">>> 获取的仓库的信息 o ={}",o); +// if(ObjectUtils.isNull(o)){ +// QueryWrapper queryWrapper = new QueryWrapper<>(); +// queryWrapper.eq("department",deptId) +// .eq("is_deleted",0) +// .eq("enable_status",2); +// List list = warehouseWarehouseService.list(queryWrapper); +// if(!Objects.isNull(list) && !list.isEmpty()){ +// +// // 寻找中心仓 +// for (BasicdataWarehouseEntity basicdataWarehouseEntity : list) { +// if("2".equals(basicdataWarehouseEntity.getFunctionType())){ +// o = basicdataWarehouseEntity; +// } +// } +// // 找不到 就去第一个 +// if(ObjectUtils.isNull(o)){ +// o= list.get(0); +// } +// +// // 设定缓存时间 1小时的缓存时间 +// bladeRedis.setEx(key,o, 60 * 60L); +// } +// +// } +// +// return o; +// +// +// +// +// } @Override public BasicdataWarehouseEntity getEntityWarehouseId(Long warehouseId) {