1、ApiLogAspect类判断某个接口数据量太大不返回数据
2、英语模块翻译文章list实现修改线程安全 3、文章页面重置按钮bug修复 4、区域编码页面优化
This commit is contained in:
parent
d1fd8d04eb
commit
2b62ca8b3a
|
|
@ -326,6 +326,8 @@ export default {
|
||||||
this.queryParams.createTime = null
|
this.queryParams.createTime = null
|
||||||
this.queryParams.endCreateTime = null
|
this.queryParams.endCreateTime = null
|
||||||
|
|
||||||
|
this.queryParams.condition = null;
|
||||||
|
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,20 @@
|
||||||
:load="loadNode"
|
:load="loadNode"
|
||||||
highlight-current
|
highlight-current
|
||||||
>
|
>
|
||||||
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
||||||
|
<span>{{ node.label }}</span>
|
||||||
|
<span style="margin-left: 50px">
|
||||||
|
<el-tooltip class="item" effect="dark" content="点击去百度" placement="right">
|
||||||
|
<el-button
|
||||||
|
icon="el-icon-search"
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
@click="() => toBaidu(node, data)">
|
||||||
|
</el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -55,6 +69,14 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
//跳转页面
|
||||||
|
toBaidu(node, data) {
|
||||||
|
console.log(node)
|
||||||
|
|
||||||
|
//打开新标签跳转
|
||||||
|
window.open('https://www.baidu.com/s?wd=' + node.data.name)
|
||||||
|
},
|
||||||
|
|
||||||
getProvinceAreaList() {
|
getProvinceAreaList() {
|
||||||
getProvinceArea().then(res => {
|
getProvinceArea().then(res => {
|
||||||
this.dataList = res.data
|
this.dataList = res.data
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 英语文章service接口实现
|
* 英语文章service接口实现
|
||||||
|
|
@ -145,8 +146,8 @@ public class EnglishArticleServiceImpl extends ServiceImpl<EnglishArticleMapper,
|
||||||
* @return 文章实体类
|
* @return 文章实体类
|
||||||
*/
|
*/
|
||||||
private EnglishArticle translation(EnglishArticle englishArticle) {
|
private EnglishArticle translation(EnglishArticle englishArticle) {
|
||||||
// 使用线程安全的Vector
|
// 使用线程安全的CopyOnWriteArrayList
|
||||||
Vector<Thread> threads = new Vector<Thread>();
|
CopyOnWriteArrayList<Thread> threads = new CopyOnWriteArrayList<>();
|
||||||
|
|
||||||
Thread thread1 = new Thread(() -> {
|
Thread thread1 = new Thread(() -> {
|
||||||
R<TranslationVo> titleR = remoteTranslationFeign.translation(englishArticle.getTitleChinese());
|
R<TranslationVo> titleR = remoteTranslationFeign.translation(englishArticle.getTitleChinese());
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,13 @@ public class ApiLogAspect {
|
||||||
String response = null;
|
String response = null;
|
||||||
if (Objects.nonNull(jsonResult)) {
|
if (Objects.nonNull(jsonResult)) {
|
||||||
response = jsonResult.toString();
|
response = jsonResult.toString();
|
||||||
entity.setResponse(response);
|
|
||||||
|
//数据量太大就不set了
|
||||||
|
if ("高德-区域编码".equals(name)) {
|
||||||
|
entity.setResponse("\"数据量太大了~~\"");
|
||||||
|
}else {
|
||||||
|
entity.setResponse(response);
|
||||||
|
}
|
||||||
|
|
||||||
//如果降级error
|
//如果降级error
|
||||||
if (response.contains(ERROR_500)) {
|
if (response.contains(ERROR_500)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue