|
|
@@ -2888,20 +2888,19 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
private GptActivityRedeemResult requestGptActivityRedeemCode(String apiDomain, GroupsRelation giftRelation, GoodsDonSku giftSku) throws Exception {
|
|
|
//默认5刀额度
|
|
|
Integer quota = 2500000;
|
|
|
- Long expiredTime = giftRelation.getExpiryTime() == null ? 0L : giftRelation.getExpiryTime().getTime() / 1000;
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
params.put("name", "GPT代充/独立赠送");
|
|
|
params.put("count", 1);
|
|
|
params.put("quota", quota);
|
|
|
- params.put("expired_time", expiredTime);
|
|
|
- params.put("share_user_id", 0);
|
|
|
String apiUrl = StrUtil.removeSuffix(apiDomain, "/") + "/api/redemption/";
|
|
|
- String response = HttpRequest.post(apiUrl)
|
|
|
- .header("Content-Type", "application/json")
|
|
|
- .body(Jsons.toJson(params))
|
|
|
- .timeout(15000)
|
|
|
- .execute()
|
|
|
- .body();
|
|
|
+ String response = HttpRequest.post(apiUrl)
|
|
|
+ .header("Content-Type", "application/json")
|
|
|
+ .header("Authorization", "Bearer " + Constant.NEBULA_API_AUTH_KEY)
|
|
|
+ .header("New-Api-User", Constant.NEBULA_NEW_API_USER)
|
|
|
+ .body(Jsons.toJson(params))
|
|
|
+ .timeout(15000)
|
|
|
+ .execute()
|
|
|
+ .body();
|
|
|
if (StrUtil.isBlank(response)) {
|
|
|
throw BusinessRuntimeException.getInstance("系统异常,请重新兑换");
|
|
|
}
|
|
|
@@ -2918,7 +2917,6 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
result.setRedeemCode(dataNode.get(0).asText());
|
|
|
result.setApiResponse(response);
|
|
|
result.setQuota(quota);
|
|
|
- result.setExpiredTime(expiredTime);
|
|
|
return result;
|
|
|
}
|
|
|
|