心跳状态转义
This commit is contained in:
parent
8a49b1da68
commit
892528576b
@ -21,6 +21,8 @@ public class HBLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(HBLogic.class);
|
||||
|
||||
public static final String[] stable = {"空闲", "故障"};
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
@ -30,8 +32,8 @@ public class HBLogic implements ServiceLogic {
|
||||
String gunStatus = (String) req.get("gunStatus");
|
||||
int gunStatusInt = Integer.parseInt(gunStatus);
|
||||
String gunkey = "gun:".concat(pileNo).concat(gunId);
|
||||
Map<String, Integer> cacheGun = REDIS.getCacheMap(gunkey);
|
||||
cacheGun.put("status", gunStatusInt);
|
||||
Map<String, String> cacheGun = REDIS.getCacheMap(gunkey);
|
||||
cacheGun.put("status", stable[gunStatusInt]);
|
||||
REDIS.setCacheMap(gunkey, cacheGun);
|
||||
String skey = gunkey.concat(".seqhex");
|
||||
String seq = seqHex(skey);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user