保存0x13, 0x17, 0x19, 0x23中的soc

This commit is contained in:
Guoqs
2024-12-12 13:27:09 +08:00
parent b395de00c1
commit d084a58937

View File

@@ -430,16 +430,27 @@ public class YKCUtils {
}
}
/**
* 根据交易流水号获取redis保存的soc信息
*/
public static Map<String, String> getSOCMap(String transactionCode) {
String hashKey = CacheConstants.GET_THE_SOC + transactionCode;
RedisCache staticRedisCache = StaticRedisCache.staticRedisCache;
return staticRedisCache.getCacheMap(hashKey);
}
/**
* 根据的交易码获取当前soc
* @param transactionCode
*/
public static String getCurrentSOC(String transactionCode) {
String hashKey = CacheConstants.GET_THE_SOC + transactionCode;
RedisCache staticRedisCache = StaticRedisCache.staticRedisCache;
Map<String, Object> cacheMap = staticRedisCache.getCacheMap(hashKey);
// String hashKey = CacheConstants.GET_THE_SOC + transactionCode;
// RedisCache staticRedisCache = StaticRedisCache.staticRedisCache;
// Map<String, Object> cacheMap = staticRedisCache.getCacheMap(hashKey);
Map<String, String> socMap = getSOCMap(transactionCode);
// 获取最小值和最大值, 两个值中最大的为当前soc
return (String) cacheMap.get("max");
return (String) socMap.get("max");
}
}