将启动结果写入缓存
This commit is contained in:
parent
6fadbb070d
commit
ff2f2eee4a
@ -73,7 +73,7 @@ public class OrderDataLogic implements ServiceLogic {
|
||||
final R r = pileOrderService.pileEndOrder(orderNo);
|
||||
if (orderNo.equals("00000000000000000000000000000000") || (r != null && r.getMsg() != null && r.getMsg().contains(
|
||||
"无效订单"))) {
|
||||
log.error(">>INVALID order [{}] detected. MUST check the system.<<", orderNo);
|
||||
log.error(">>INVALID order [{}] detected. MUST check the system or [{}].<<", orderNo, gunkey);
|
||||
}
|
||||
String resultStr = "6815".concat(req.get("seqhex").toString()).concat("0040").concat(orderNo);
|
||||
if (r != null && r.getCode() == 200) {
|
||||
|
||||
@ -43,7 +43,6 @@ public class RemoteStartReplyDataLogic implements ServiceLogic {
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
RemoteStartReplyData remoteStartReplyData = objectMapper.convertValue(req, RemoteStartReplyData.class);
|
||||
@ -69,12 +68,20 @@ public class RemoteStartReplyDataLogic implements ServiceLogic {
|
||||
pileOrderService.pileStartup(orderNo, 1, "启动充电成功");
|
||||
if (pushOrder != null) {
|
||||
REDIS.setCacheMapValue(pushOrderKey, "startChargeSeqStat", 2);
|
||||
} else {
|
||||
Map map = new HashMap<>();
|
||||
map.put("startChargeSeqStat", Integer.valueOf(2));
|
||||
REDIS.setCacheMap(pushOrderKey, map);
|
||||
}
|
||||
} else {
|
||||
final String remark = frs.get(remoteStartReplyData.getFailReason());
|
||||
pileOrderService.pileStartup(orderNo, 2, remark == null ? "未知错误" : remark);
|
||||
if (pushOrder != null) {
|
||||
REDIS.setCacheMapValue(pushOrderKey, "startChargeSeqStat", 4);
|
||||
} else {
|
||||
Map map = new HashMap<>();
|
||||
map.put("startChargeSeqStat", Integer.valueOf(4));
|
||||
REDIS.setCacheMap(pushOrderKey, map);
|
||||
}
|
||||
}
|
||||
return new ServiceResult(false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user