mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
保存0x13, 0x17, 0x19, 0x23中的soc
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user