|
@@ -20,15 +20,14 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class AigcServiceImpl implements AigcService {
|
|
|
|
|
|
- private static final HttpPoolClientUtil HTTP_POOL_CLIENT_UTIL_DEFAULT = HttpClientUtil.create(5000, 8000, 20, 100, 3, 3000);
|
|
|
+ private static final HttpPoolClientUtil HTTP_POOL_CLIENT_UTIL_DEFAULT = HttpClientUtil.create(5000, 10000, 20, 100, 3, 3000);
|
|
|
|
|
|
@Override
|
|
|
//获取所有长文系统托管计划
|
|
|
public List<LongArticleSystemPlan> getAllLongArticleSystemPlan() {
|
|
|
String apiUrl = "http://aigc-api.cybertogether.net/aigc/publish/LongArticleSystem/getAllLongArticleSystemPlan";
|
|
|
try {
|
|
|
- HttpPoolClientUtil httpPoolClientUtil = HttpClientUtil.create(5000, 20000, 5, 10, 3, 3000);
|
|
|
- String res = httpPoolClientUtil.post(apiUrl);
|
|
|
+ String res = HTTP_POOL_CLIENT_UTIL_DEFAULT.post(apiUrl);
|
|
|
JSONObject jsonObject = JSON.parseObject(res);
|
|
|
Integer code = jsonObject.getInteger("code");
|
|
|
if (code == 0) {
|
|
@@ -69,8 +68,7 @@ public class AigcServiceImpl implements AigcService {
|
|
|
public LongArticleSystemContentVO listWaitingMatchMiniprogramContents(GetContentsParam param) {
|
|
|
String apiUrl = "http://aigc-api.cybertogether.net/aigc/publish/LongArticleSystem/listWaitingMatchMiniprogramContents";
|
|
|
try {
|
|
|
- HttpPoolClientUtil httpPoolClientUtil = HttpClientUtil.create(5000, 8000, 5, 10, 3, 3000);
|
|
|
- String res = httpPoolClientUtil.post(apiUrl, JSON.toJSONString(param));
|
|
|
+ String res = HTTP_POOL_CLIENT_UTIL_DEFAULT.post(apiUrl, JSON.toJSONString(param));
|
|
|
JSONObject jsonObject = JSON.parseObject(res);
|
|
|
Integer code = jsonObject.getInteger("code");
|
|
|
if (code == 0) {
|
|
@@ -104,8 +102,7 @@ public class AigcServiceImpl implements AigcService {
|
|
|
public String createPushTask(CreatePushTaskParam param) {
|
|
|
String apiUrl = "http://aigc-api.cybertogether.net/aigc/publish/LongArticleSystem/createPushTask";
|
|
|
try {
|
|
|
- HttpPoolClientUtil httpPoolClientUtil = HttpClientUtil.create(5000, 8000, 5, 10, 3, 3000);
|
|
|
- String res = httpPoolClientUtil.post(apiUrl, JSON.toJSONString(param));
|
|
|
+ String res = HTTP_POOL_CLIENT_UTIL_DEFAULT.post(apiUrl, JSON.toJSONString(param));
|
|
|
JSONObject jsonObject = JSON.parseObject(res);
|
|
|
Integer code = jsonObject.getInteger("code");
|
|
|
if (code == 0) {
|
|
@@ -122,8 +119,7 @@ public class AigcServiceImpl implements AigcService {
|
|
|
public boolean updateMatchMiniprogramStatus(MatchMiniprogramStatusParam param) {
|
|
|
String apiUrl = "http://aigc-api.cybertogether.net/aigc/publish/LongArticleSystem/updateMatchMiniprogramStatus";
|
|
|
try {
|
|
|
- HttpPoolClientUtil httpPoolClientUtil = HttpClientUtil.create(5000, 8000, 5, 10, 3, 3000);
|
|
|
- String res = httpPoolClientUtil.post(apiUrl, JSON.toJSONString(param));
|
|
|
+ String res = HTTP_POOL_CLIENT_UTIL_DEFAULT.post(apiUrl, JSON.toJSONString(param));
|
|
|
JSONObject jsonObject = JSON.parseObject(res);
|
|
|
Integer code = jsonObject.getInteger("code");
|
|
|
if (code == 0) {
|
|
@@ -139,8 +135,7 @@ public class AigcServiceImpl implements AigcService {
|
|
|
public boolean filterSortContents(FilterSortParam param) {
|
|
|
String apiUrl = "http://aigc-api.cybertogether.net/aigc/publish/LongArticleSystem/filterSortContents";
|
|
|
try {
|
|
|
- HttpPoolClientUtil httpPoolClientUtil = HttpClientUtil.create(5000, 8000, 5, 10, 3, 3000);
|
|
|
- String res = httpPoolClientUtil.post(apiUrl, JSON.toJSONString(param));
|
|
|
+ String res = HTTP_POOL_CLIENT_UTIL_DEFAULT.post(apiUrl, JSON.toJSONString(param));
|
|
|
JSONObject jsonObject = JSON.parseObject(res);
|
|
|
Integer code = jsonObject.getInteger("code");
|
|
|
if (code == 0) {
|
|
@@ -175,11 +170,10 @@ public class AigcServiceImpl implements AigcService {
|
|
|
}
|
|
|
String apiUrl = "http://aigc-api.cybertogether.net/aigc//publish/LongArticleSystem/uploadMiniprogramCover";
|
|
|
try {
|
|
|
- HttpPoolClientUtil httpPoolClientUtil = HttpClientUtil.create(5000, 8000, 5, 10, 3, 3000);
|
|
|
JSONObject param = new JSONObject();
|
|
|
param.put("coverUrl", coverUrl);
|
|
|
param.put("publishContentId", publishContentId);
|
|
|
- String res = httpPoolClientUtil.post(apiUrl, JSONObject.toJSONString(param));
|
|
|
+ String res = HTTP_POOL_CLIENT_UTIL_DEFAULT.post(apiUrl, JSONObject.toJSONString(param));
|
|
|
JSONObject jsonObject = JSON.parseObject(res);
|
|
|
Integer code = jsonObject.getInteger("code");
|
|
|
if (code == 0) {
|