只推给对应的第三方
This commit is contained in:
parent
65139d6496
commit
dab1aeabc0
@ -51,7 +51,6 @@ public class NotificationEquipChargeStatusTask extends CoreDispatcher {
|
|||||||
List<AuthSecretToken> authSecretTokenOutList = authSecretTokenRepository.findBySecretTokenType(SECRET_TOKEN_TYPE_OUT);
|
List<AuthSecretToken> authSecretTokenOutList = authSecretTokenRepository.findBySecretTokenType(SECRET_TOKEN_TYPE_OUT);
|
||||||
final Collection<String> gunkeys = REDIS.keys("gun:*");
|
final Collection<String> gunkeys = REDIS.keys("gun:*");
|
||||||
for (AuthSecretToken authSecretToken : authSecretTokenOutList) {
|
for (AuthSecretToken authSecretToken : authSecretTokenOutList) {
|
||||||
|
|
||||||
for (String gunkey : gunkeys) {
|
for (String gunkey : gunkeys) {
|
||||||
if (!gunkey.endsWith(".seqdec") && !gunkey.endsWith(".seqhex") && !gunkey.endsWith(".hori")) {
|
if (!gunkey.endsWith(".seqdec") && !gunkey.endsWith(".seqhex") && !gunkey.endsWith(".hori")) {
|
||||||
final Map<String, Object> cacheGun = REDIS.getCacheMap(gunkey);
|
final Map<String, Object> cacheGun = REDIS.getCacheMap(gunkey);
|
||||||
@ -59,8 +58,10 @@ public class NotificationEquipChargeStatusTask extends CoreDispatcher {
|
|||||||
if (isInteger(status)) {
|
if (isInteger(status)) {
|
||||||
final String orderkey = cacheGun.get("orderkey").toString();
|
final String orderkey = cacheGun.get("orderkey").toString();
|
||||||
EquipChargeStatus equipChargeStatus = new EquipChargeStatus();
|
EquipChargeStatus equipChargeStatus = new EquipChargeStatus();
|
||||||
equipChargeStatus.setStartChargeSeq(REDIS.getCacheMapValue(orderkey.replace("order:", "pushOrder:"),
|
final String internetSerialNumber = REDIS.getCacheMapValue(orderkey.replace("order:", "pushOrder:"),
|
||||||
"internetSerialNumber"));
|
"internetSerialNumber");
|
||||||
|
if (!internetSerialNumber.startsWith(authSecretToken.getOperatorId3irdpty())) continue;
|
||||||
|
equipChargeStatus.setStartChargeSeq(internetSerialNumber);
|
||||||
equipChargeStatus.setStartChargeSeqStat(2);
|
equipChargeStatus.setStartChargeSeqStat(2);
|
||||||
equipChargeStatus.setConnectorID(orderkey.substring(6, 22));
|
equipChargeStatus.setConnectorID(orderkey.substring(6, 22));
|
||||||
String current = REDIS.getCacheMapValue(gunkey, "current");
|
String current = REDIS.getCacheMapValue(gunkey, "current");
|
||||||
@ -204,8 +205,7 @@ public class NotificationEquipChargeStatusTask extends CoreDispatcher {
|
|||||||
EquipChargeStatusRes equipChargeStatusRes = DTOJsonHelper.parseResponseData(responseBody,
|
EquipChargeStatusRes equipChargeStatusRes = DTOJsonHelper.parseResponseData(responseBody,
|
||||||
EquipChargeStatusRes.class, authSecretTokenOut);
|
EquipChargeStatusRes.class, authSecretTokenOut);
|
||||||
if (equipChargeStatusRes != null && equipChargeStatusRes.getSuccStat() != 0) {
|
if (equipChargeStatusRes != null && equipChargeStatusRes.getSuccStat() != 0) {
|
||||||
throw new RuntimeException(String.format("push equipment order status [%s] failed: %s",
|
logger.error("push equipment order status [%s] failed: %s", equipChargeStatus.getStartChargeSeq(), responseBody);
|
||||||
equipChargeStatus.getStartChargeSeq(), responseBody));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user