incase cache fail

This commit is contained in:
zz 2021-12-24 17:25:30 +08:00
parent f80f0aa6b4
commit 4c8350a1dc
2 changed files with 11 additions and 3 deletions

View File

@ -16,4 +16,6 @@ public interface XhpcHistoryOrderRepository extends JpaRepository<XhpcHistoryOrd
List<XhpcHistoryOrder> findByConfirmResultNotAndOperatorId3rdptyEvcsIsNotNull(int succCode);
List<XhpcHistoryOrder> findByConfirmResultNotAndSource(int confirmResult, int source);
}

View File

@ -54,15 +54,21 @@ public class NotificationChargeOrderInfoTask extends CoreDispatcher {
}
List<AuthSecretToken> authSecretTokenList = authSecretTokenRepository.findBySecretTokenType(SECRET_TOKEN_TYPE_OUT);
List<XhpcHistoryOrder> xhpcHistoryOrderList =
xhpcHistoryOrderRepository.findByConfirmResultNotAndOperatorId3rdptyEvcsIsNotNull(0);
xhpcHistoryOrderRepository.findByConfirmResultNotAndSource(0, 1);
for (XhpcHistoryOrder horder : xhpcHistoryOrderList) {
for (AuthSecretToken authSecretToken : authSecretTokenList) {
String operatorId3rdptyEvcs = horder.getOperatorId3rdptyEvcs();
if (operatorId3rdptyEvcs == null) {
if (horder.getInternetSerialNumber() != null) operatorId3rdptyEvcs =
horder.getInternetSerialNumber().substring(0, 9);
if (horder.getInternetSerialNumber() != null) {
operatorId3rdptyEvcs = horder.getInternetSerialNumber().substring(0, 9);
horder.setOperatorId3rdptyEvcs(operatorId3rdptyEvcs);
xhpcHistoryOrderRepository.save(horder); // mending
}
}
if (authSecretToken.getOperatorId3irdpty().equals(operatorId3rdptyEvcs)) {
// final List<XhpcStatisticsTimeInterval> statisticsTimeIntervals =
// xhpcStatisticsTimeIntervalRepository.findAllByHistoryOrderId(horder.getHistoryOrderId());
// horder.setXhpcStatisticsTimeIntervalList(statisticsTimeIntervals); //似乎并不需要
ChargeOrderInfo chargeOrderInfo = new ChargeOrderInfo(horder);
final ChargeOrderInfoResponse pushResp = notify(chargeOrderInfo, authSecretToken);
if (pushResp != null) {