不是三方订单不推送

This commit is contained in:
ZZ 2021-11-24 15:55:56 +08:00
parent 98eca09705
commit 4403368565
4 changed files with 36 additions and 25 deletions

View File

@ -55,6 +55,7 @@ public class NotificationStopChargeResultTask extends CoreDispatcher {
Boolean isStopNotified = (Boolean) pushOrder.get("isStopNotified"); Boolean isStopNotified = (Boolean) pushOrder.get("isStopNotified");
if (isStopNotified == null || !isStopNotified) { if (isStopNotified == null || !isStopNotified) {
String internetSerialNumber = (String) pushOrder.get("internetSerialNumber"); String internetSerialNumber = (String) pushOrder.get("internetSerialNumber");
if (internetSerialNumber != null) {
String operatorId3rdpty = internetSerialNumber.substring(0, 9); String operatorId3rdpty = internetSerialNumber.substring(0, 9);
AuthSecretToken authSecretTokenOut = AuthSecretToken authSecretTokenOut =
authSecretTokenRepository.findByOperatorId3irdptyAndSecretTokenType(operatorId3rdpty, authSecretTokenRepository.findByOperatorId3irdptyAndSecretTokenType(operatorId3rdpty,
@ -79,4 +80,5 @@ public class NotificationStopChargeResultTask extends CoreDispatcher {
} }
} }
} }
}
} }

View File

@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 127.0.0.1:8848 server-addr: 172.31.183.135:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 127.0.0.1:8848 server-addr: 172.31.183.135:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -230,7 +230,10 @@ public class RealtimeDataLogic implements ServiceLogic {
} else { } else {
log.error("abnormal.2.2 order[{}]", orderNo); log.error("abnormal.2.2 order[{}]", orderNo);
cacheOrder.put("abnormal", "2.2");//not respond cacheOrder.put("abnormal", "2.2");//not respond
REDIS.setCacheMapValue(orderkey.replace("order:", "pushOrder:"), "startChargeSeqStat", 4); String pushOrderKey = orderkey.replace("order:", "pushOrder:");
if (REDIS.getCacheMap(pushOrderKey) != null) {
REDIS.setCacheMapValue(pushOrderKey, "startChargeSeqStat", 4);
}
} }
orderNo = orderkey.replace("order:", ""); orderNo = orderkey.replace("order:", "");
pileOrderService.abnormalOrder(orderNo); pileOrderService.abnormalOrder(orderNo);

View File

@ -56,6 +56,8 @@ public class RemoteStartReplyDataLogic implements ServiceLogic {
Map<String, Object> cacheGun = REDIS.getCacheMap(gunkey); Map<String, Object> cacheGun = REDIS.getCacheMap(gunkey);
REDIS.setCacheMap(orderkey, cacheOrder); REDIS.setCacheMap(orderkey, cacheOrder);
REDIS.setCacheMap(gunkey, cacheGun); REDIS.setCacheMap(gunkey, cacheGun);
String pushOrderKey = orderkey.replace("order:", "pushOrder:");
Map<String, Object> pushOrder = REDIS.getCacheMap(pushOrderKey);
if (HEX_01.equals(remoteStartReplyData.getStartResult())) { if (HEX_01.equals(remoteStartReplyData.getStartResult())) {
final String orderstarttime = DateUtil.format(Calendar.getInstance().getTime(), NORM_DATETIME_FORMAT); final String orderstarttime = DateUtil.format(Calendar.getInstance().getTime(), NORM_DATETIME_FORMAT);
cacheGun.put("orderstarttime", orderstarttime); cacheGun.put("orderstarttime", orderstarttime);
@ -65,11 +67,15 @@ public class RemoteStartReplyDataLogic implements ServiceLogic {
REDIS.setCacheMap(gunkey, cacheGun); REDIS.setCacheMap(gunkey, cacheGun);
REDIS.setCacheMap(orderkey, cacheOrder); REDIS.setCacheMap(orderkey, cacheOrder);
pileOrderService.pileStartup(orderNo, 1, "启动充电成功"); pileOrderService.pileStartup(orderNo, 1, "启动充电成功");
REDIS.setCacheMapValue(orderkey.replace("order:", "pushOrder:"), "startChargeSeqStat", 2); if (pushOrder != null) {
REDIS.setCacheMapValue(pushOrderKey, "startChargeSeqStat", 2);
}
} else { } else {
REDIS.setCacheMapValue(orderkey.replace("order:", "pushOrder:"), "startChargeSeqStat", 4);
final String remark = frs.get(remoteStartReplyData.getFailReason()); final String remark = frs.get(remoteStartReplyData.getFailReason());
pileOrderService.pileStartup(orderNo, 2, remark == null ? "未知错误" : remark); pileOrderService.pileStartup(orderNo, 2, remark == null ? "未知错误" : remark);
if (pushOrder != null) {
REDIS.setCacheMapValue(pushOrderKey, "startChargeSeqStat", 4);
}
} }
return new ServiceResult(false); return new ServiceResult(false);
} }