修正停机位-登机桥关系只会缓存一个的问题。
This commit is contained in:
+9
-8
@@ -44,19 +44,20 @@ public class OrmsStandAirbridgeManager {
|
||||
RedisService redisService = (RedisService) SpringUtil
|
||||
.getBean("redisService");
|
||||
Boolean keyExists = redisService.hasKey(KEY_ORMSSTANDAIRBRIDGE);
|
||||
|
||||
|
||||
if(!keyExists)
|
||||
{
|
||||
//远程获取
|
||||
redisService.hmset(KEY_ORMSSTANDAIRBRIDGE, new HashMap<String,Object>(), 3600L);
|
||||
}
|
||||
|
||||
Boolean filedExists = redisService.hHasKey(KEY_ORMSSTANDAIRBRIDGE, standCode);
|
||||
if(!filedExists)
|
||||
{
|
||||
//远程获取
|
||||
IOrmsStandService ormsStandService = (IOrmsStandService) SpringUtil
|
||||
.getBean("ormsStandService");
|
||||
List<String> lsAirbridgeCodes = ormsStandService.getAirbridgeCodeByStandCode(standCode);
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put(standCode, JsonUtil.getString(lsAirbridgeCodes));
|
||||
|
||||
redisService.hmset(KEY_ORMSSTANDAIRBRIDGE, map, 3600L);
|
||||
}
|
||||
redisService.hset(KEY_ORMSSTANDAIRBRIDGE, standCode, JsonUtil.getString(lsAirbridgeCodes));
|
||||
}
|
||||
|
||||
//本地获取
|
||||
String jsonListStr = (String) redisService.hget(KEY_ORMSSTANDAIRBRIDGE, standCode);
|
||||
|
||||
Reference in New Issue
Block a user