|
@@ -31,6 +31,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
+import java.util.Optional;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -228,11 +229,12 @@ public class GptRechargeServiceImpl implements GptRechargeService {
|
|
|
JSONObject jsonResponse = JSONUtil.parseObj(body);
|
|
JSONObject jsonResponse = JSONUtil.parseObj(body);
|
|
|
TaskResult result = new TaskResult(
|
|
TaskResult result = new TaskResult(
|
|
|
jsonResponse.getStr("status"),
|
|
jsonResponse.getStr("status"),
|
|
|
- jsonResponse.getStr("result")
|
|
|
|
|
|
|
+ jsonResponse.getStr("result"),
|
|
|
|
|
+ jsonResponse.getStr("error")
|
|
|
);
|
|
);
|
|
|
log.info("任务查询结果: {}", result);
|
|
log.info("任务查询结果: {}", result);
|
|
|
String status = result.getStatus();
|
|
String status = result.getStatus();
|
|
|
- String resultResult = result.getResult();
|
|
|
|
|
|
|
+ String resultResult = Optional.ofNullable(result.getError()).orElse(result.getResult());
|
|
|
//更新代充状态
|
|
//更新代充状态
|
|
|
resetGroupsRelationRechargeStatus(taskId, status, resultResult);
|
|
resetGroupsRelationRechargeStatus(taskId, status, resultResult);
|
|
|
return result;
|
|
return result;
|