|
@@ -74,7 +74,8 @@ public class YoumeiAccountServiceImpl extends ServiceImpl<YoumeiAccountMapper, Y
|
|
@SneakyThrows
|
|
@SneakyThrows
|
|
public Boolean wordCheck(String text) {
|
|
public Boolean wordCheck(String text) {
|
|
List<NameValuePair> formparams = new ArrayList<>();
|
|
List<NameValuePair> formparams = new ArrayList<>();
|
|
- formparams.add(new BasicNameValuePair("accessToken", getWbjcTokenCache()));
|
|
|
|
|
|
+ var tokenCache = getWbjcTokenCache();
|
|
|
|
+ formparams.add(new BasicNameValuePair("accessToken", tokenCache));
|
|
formparams.add(new BasicNameValuePair("text", text));
|
|
formparams.add(new BasicNameValuePair("text", text));
|
|
@Cleanup
|
|
@Cleanup
|
|
UrlEncodedFormEntity params = new UrlEncodedFormEntity(formparams, Consts.UTF_8);
|
|
UrlEncodedFormEntity params = new UrlEncodedFormEntity(formparams, Consts.UTF_8);
|
|
@@ -82,6 +83,7 @@ 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);
|
|
|
|
|
|
|
|
+ logger.info("key", "wordCheck", "accessToken", tokenCache, "text", text);
|
|
Content body;
|
|
Content body;
|
|
try {
|
|
try {
|
|
body = client.execute(httpPost, new ContentResponseHandler());
|
|
body = client.execute(httpPost, new ContentResponseHandler());
|
|
@@ -89,7 +91,7 @@ public class YoumeiAccountServiceImpl extends ServiceImpl<YoumeiAccountMapper, Y
|
|
logger.error("error", e);
|
|
logger.error("error", e);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- logger.info("key","wordCheck","response", body.asString(StandardCharsets.UTF_8));
|
|
|
|
|
|
+ logger.info("key", "wordCheck", "response", body.asString(StandardCharsets.UTF_8));
|
|
|
|
|
|
CheckWordResponse checkWordDto = objectMapper.readValue(body.asString(StandardCharsets.UTF_8), CheckWordResponse.class);
|
|
CheckWordResponse checkWordDto = objectMapper.readValue(body.asString(StandardCharsets.UTF_8), CheckWordResponse.class);
|
|
CheckWordResponse.DataDTO data = checkWordDto.getData();
|
|
CheckWordResponse.DataDTO data = checkWordDto.getData();
|