1、英语单词列表模块下拉框默认选中
2、爬虫日志统计代码执行时间逻辑修改
pull/254/head
xjs 4 years ago
parent 32587fb68a
commit d8529a297f

@ -309,7 +309,8 @@ export default {
}, },
// //
form: { form: {
sort: 0 sort: 0,
isCollect: '',
}, },
// //
oneEnglishData: {}, oneEnglishData: {},
@ -349,6 +350,8 @@ export default {
created() { created() {
this.getList(); this.getList();
}, },
methods: { methods: {
//api //api
getOneEnglishApi() { getOneEnglishApi() {
@ -439,6 +442,10 @@ export default {
this.reset(); this.reset();
this.openAdd = true; this.openAdd = true;
this.title = "添加英语单词"; this.title = "添加英语单词";
//
this.form.isCollect= parseInt(this.dict.type.english_collect[0].value)
this.form.top = parseInt(this.dict.type.english_top[1].value)
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {

@ -91,7 +91,13 @@
<el-table-column label="爬虫地址" align="center" prop="url" :show-overflow-tooltip="true"/> <el-table-column label="爬虫地址" align="center" prop="url" :show-overflow-tooltip="true"/>
<el-table-column label="请求时间" align="center" prop="requestTime"> <el-table-column label="请求时间" align="center" prop="requestTime">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ Math.round(scope.row.requestTime / 1000) }}</span> <span>{{
scope.row.requestTime < 1000
?
scope.row.requestTime + '毫秒'
:
Math.round(scope.row.requestTime / 1000) + '秒'
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="复杂度" align="center" prop="complexRate"> <el-table-column label="复杂度" align="center" prop="complexRate">

@ -1,6 +1,5 @@
package com.xjs.common.aop; package com.xjs.common.aop;
import cn.hutool.core.date.DateUtil;
import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.domain.R;
import com.xjs.annotation.ReptileLog; import com.xjs.annotation.ReptileLog;
import com.xjs.business.log.RemoteLogFeign; import com.xjs.business.log.RemoteLogFeign;
@ -16,8 +15,6 @@ import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import static com.xjs.consts.ReqConst.ERROR; import static com.xjs.consts.ReqConst.ERROR;
import static com.xjs.consts.ReqConst.SUCCESS; import static com.xjs.consts.ReqConst.SUCCESS;
@ -51,13 +48,15 @@ public class reptileLogAspect {
Object obj = null; Object obj = null;
try { try {
//切入前----- //切入前-----
LocalDateTime localDateTime1 = DateUtil.date().toLocalDateTime(); // 开始时间
long startTime = System.currentTimeMillis();
obj = joinPoint.proceed(); obj = joinPoint.proceed();
//切入后----- //切入后-----
LocalDateTime localDateTime2 = DateUtil.date().toLocalDateTime(); // 结束时间
long between = ChronoUnit.MILLIS.between(localDateTime1, localDateTime2); long endTime = System.currentTimeMillis();
long between = endTime - startTime;
log.info("调用爬虫接口耗费时间:{}ms", between); log.info("调用爬虫接口耗费时间:{}ms", between);
this.handle(joinPoint, between, obj); this.handle(joinPoint, between, obj);

Loading…
Cancel
Save