fix(接口查询): sql查询去掉多余代码

--user=郭雨琦 sql查询去掉多余代码
This commit is contained in:
guoyuqi 2022-01-22 14:53:54 +08:00 committed by song-tianyang
parent 159c9a673d
commit 42e4c09e62
6 changed files with 2 additions and 42 deletions

View File

@ -249,7 +249,7 @@
project_version.name as version_name, api_definition.ref_id, user.name as user_name
from api_definition
left join user on api_definition.user_id = user.id
LEFT JOIN project_version ON project_version.id = api_definition.version_id AND project_version.project_id = #{request.projectId}
LEFT JOIN project_version ON project_version.id = api_definition.version_id
<include refid="queryWhereCondition"/>
<if test="request.orders != null and request.orders.size() > 0">
order by

View File

@ -230,7 +230,7 @@
test_case.custom_fields, test_case.ref_id
</if>
from test_case
left join project_version on project_version.id = test_case.version_id and project_version.project_id = #{request.projectId}
left join project_version on project_version.id = test_case.version_id
<include refid="queryWhereCondition"/>
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
</select>

View File

@ -243,16 +243,6 @@ export default {
this.$get('/api/definition/get/' + response.data.id, res => {
if (res.data) {
this.newData = res.data;
this.$get('/api/definition/follow/' + response.data.id, resp => {
if(resp.data&&resp.data.follows){
for (let i = 0; i <resp.data.follows.length; i++) {
if(resp.data.follows[i]===this.currentUser().id){
this.newShowFollow = true;
break;
}
}
}
});
this.dealWithTag(res.data);
this.setRequest(res.data)
if (!this.setRequest(res.data)) {

View File

@ -567,16 +567,6 @@ export default {
this.$get('/api/definition/get/' + response.data.id, res => {
if (res.data) {
this.newData = res.data;
this.$get('/api/definition/follow/' + response.data.id, resp => {
if(resp.data&&resp.data.follows){
for (let i = 0; i <resp.data.follows.length; i++) {
if(resp.data.follows[i]===this.currentUser().id){
this.newShowFollow = true;
break;
}
}
}
});
this.dealWithTag(res.data);
this.setRequest(res.data)
if (!this.setRequest(res.data)) {

View File

@ -247,16 +247,6 @@ export default {
this.$get('/api/definition/get/' + response.data.id, res => {
if (res.data) {
this.newData = res.data;
this.$get('/api/definition/follow/' + response.data.id, resp => {
if(resp.data&&resp.data.follows){
for (let i = 0; i <resp.data.follows.length; i++) {
if(resp.data.follows[i]===this.currentUser().id){
this.newShowFollow = true;
break;
}
}
}
});
this.dealWithTag(res.data);
this.setRequest(res.data)
if (!this.setRequest(res.data)) {

View File

@ -371,16 +371,6 @@ export default {
if (this.oldApiProtocol == null || this.oldApiProtocol === "") {
this.oldApiProtocol = "TCP";
}
this.$get('/api/definition/follow/' + response.data.id, resp => {
if(resp.data&&resp.data.follows){
for (let i = 0; i <resp.data.follows.length; i++) {
if(resp.data.follows[i]===this.currentUser().id){
this.newShowFollow = true;
break;
}
}
}
});
this.dealWithTag(res.data);
this.setRequest(res.data)
if (!this.setRequest(res.data)) {