|
|
@@ -177,7 +177,7 @@ public class RedeemCloudRechargeServiceImpl implements RedeemCloudRechargeServic
|
|
|
|
|
|
private RedeemCloudTaskResultResponse queryTaskResult(String cardKey, String taskId) throws Exception {
|
|
|
String baseUrl = gptRechargeCardKeyChannelService.getCardKeyDomain(cardKey);
|
|
|
- String url = baseUrl + "/sys-cdk/query?cdkCode=" + taskId;
|
|
|
+ String url = baseUrl + "/sys-cdk/exchange/result?taskId=" + taskId;
|
|
|
|
|
|
HttpResponse response = HttpRequest.get(url)
|
|
|
.setConnectionTimeout(10000)
|
|
|
@@ -189,11 +189,16 @@ public class RedeemCloudRechargeServiceImpl implements RedeemCloudRechargeServic
|
|
|
|
|
|
private TaskResult convertTaskResult(RedeemCloudTaskResultResponse taskResultResponse) {
|
|
|
TaskResult result = new TaskResult();
|
|
|
- if (taskResultResponse == null || taskResultResponse.getCode() == null || taskResultResponse.getCode() != SUCCESS_CODE || taskResultResponse.getData() == null) {
|
|
|
+ if (taskResultResponse == null || taskResultResponse.getCode() == null || taskResultResponse.getCode() != SUCCESS_CODE) {
|
|
|
result.setStatus("failed");
|
|
|
result.setError(taskResultResponse != null ? taskResultResponse.getMessage() : "任务查询失败");
|
|
|
return result;
|
|
|
}
|
|
|
+ if (taskResultResponse.getData() == null) {
|
|
|
+ result.setStatus("recharging");
|
|
|
+ result.setResult(taskResultResponse.getMessage());
|
|
|
+ return result;
|
|
|
+ }
|
|
|
String status = taskResultResponse.getData().getStatus();
|
|
|
if ("COMPLETED".equalsIgnoreCase(status)) {
|
|
|
result.setStatus("completed");
|