|
@@ -12,7 +12,7 @@ import lombok.SneakyThrows;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
|
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
|
import org.apache.hc.client5.http.entity.UrlEncodedFormEntity;
|
|
import org.apache.hc.client5.http.entity.UrlEncodedFormEntity;
|
|
-import org.apache.hc.client5.http.fluent.ContentResponseHandler;
|
|
|
|
|
|
+import org.apache.hc.client5.http.impl.classic.BasicHttpClientResponseHandler;
|
|
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
|
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
|
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
|
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
|
import org.apache.hc.core5.http.NameValuePair;
|
|
import org.apache.hc.core5.http.NameValuePair;
|
|
@@ -20,7 +20,6 @@ import org.apache.hc.core5.http.message.BasicNameValuePair;
|
|
import org.apache.http.Consts;
|
|
import org.apache.http.Consts;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.nio.charset.StandardCharsets;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -108,9 +107,8 @@ public class YoumeiAccountServiceImpl extends ServiceImpl<YoumeiAccountMapper, Y
|
|
var httpPost = new HttpPost("https://api-open-wx-www.yqt365.com/dataapp/api/umei/fw/open/wbjc/article_correct_external");
|
|
var httpPost = new HttpPost("https://api-open-wx-www.yqt365.com/dataapp/api/umei/fw/open/wbjc/article_correct_external");
|
|
httpPost.setEntity(params);
|
|
httpPost.setEntity(params);
|
|
|
|
|
|
- var body = client.execute(httpPost, new ContentResponseHandler());
|
|
|
|
-
|
|
|
|
- CheckWordResponse checkWordDto = objectMapper.readValue(body.asString(StandardCharsets.UTF_8), CheckWordResponse.class);
|
|
|
|
|
|
+ var body = client.execute(httpPost,new BasicHttpClientResponseHandler());
|
|
|
|
+ CheckWordResponse checkWordDto = objectMapper.readValue(body, CheckWordResponse.class);
|
|
CheckWordResponse.DataDTO data = checkWordDto.getData();
|
|
CheckWordResponse.DataDTO data = checkWordDto.getData();
|
|
|
|
|
|
if (data.getChecklist().size() == 0) {
|
|
if (data.getChecklist().size() == 0) {
|