| | |
| | | responseJson = String.valueOf(res); |
| | | } |
| | | Object codeObj = res != null ? res.get("code") : null; |
| | | boolean success = Integer.valueOf(200).equals(codeObj); |
| | | int status = success ? cloudWmsNotifyLogService.getNotifyStatusSuccess() : cloudWmsNotifyLogService.getNotifyStatusPending(); |
| | | if (!success && !isInfiniteRetry(effectiveMaxRetry) && nextRetry >= effectiveMaxRetry) { |
| | | status = cloudWmsNotifyLogService.getNotifyStatusFail(); |
| | | } |
| | | Object statusObj = res != null ? res.get("status") : null; |
| | | boolean success = Integer.valueOf(200).equals(codeObj) || Integer.valueOf(200).equals(statusObj); |
| | | int status = success ? cloudWmsNotifyLogService.getNotifyStatusSuccess() : cloudWmsNotifyLogService.getNotifyStatusFail(); |
| | | logRecord.setLastRequestBody(requestBody); |
| | | logRecord.setLastResponseBody(responseJson); |
| | | logRecord.setLastNotifyTime(now); |
| | |
| | | logRecord.setLastNotifyTime(now); |
| | | logRecord.setRetryCount(nextRetry); |
| | | // logRecord.setNotifyStatus(nextRetry >= effectiveMaxRetry ? cloudWmsNotifyLogService.getNotifyStatusFail() : cloudWmsNotifyLogService.getNotifyStatusPending()); |
| | | logRecord.setNotifyStatus(!isInfiniteRetry(effectiveMaxRetry) && nextRetry >= effectiveMaxRetry |
| | | int status = !isInfiniteRetry(effectiveMaxRetry) && nextRetry >= effectiveMaxRetry |
| | | ? cloudWmsNotifyLogService.getNotifyStatusFail() |
| | | : cloudWmsNotifyLogService.getNotifyStatusPending()); |
| | | : cloudWmsNotifyLogService.getNotifyStatusPending(); |
| | | logRecord.setNotifyStatus(status); |
| | | logRecord.setUpdateTime(now); |
| | | cloudWmsNotifyLogService.updateById(logRecord); |
| | | log.warn("云仓上报失败,id={},bizRef={},attempt={},notifyStatus={},error={}", |