fix(接口测试): 解决接口移动时不更新相关模块路径问题

--user=郭雨琦
--bug=1014713
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001014713
This commit is contained in:
guoyuqi 2022-07-08 15:14:24 +08:00 committed by xiaomeinvG
parent b780741f48
commit 70826cc234
2 changed files with 4 additions and 7 deletions

View File

@ -1539,11 +1539,6 @@ public class ApiDefinitionService {
public void editApiByParam(ApiBatchRequest request) {
//name在这里只是查询参数
request.setName(null);
//如果移动模块需要重新设置模块路径
if (request.getModuleId() != null) {
ApiModule apiModule = apiModuleMapper.selectByPrimaryKey(request.getModuleId());
request.setModulePath("/" + apiModule.getName());
}
ApiDefinitionWithBLOBs definitionWithBLOBs = new ApiDefinitionWithBLOBs();
BeanUtils.copyBean(definitionWithBLOBs, request);
definitionWithBLOBs.setUpdateTime(System.currentTimeMillis());

View File

@ -242,7 +242,8 @@ import {API_DEFINITION_CONFIGS} from "@/business/components/common/components/se
import MsTipButton from "@/business/components/common/components/MsTipButton";
import CaseBatchMove from "@/business/components/api/definition/components/basis/BatchMove";
import {
buildBatchParam, deepClone,
buildBatchParam,
deepClone,
getCustomTableHeader,
getCustomTableWidth,
getLastTableSortField,
@ -807,6 +808,7 @@ export default {
param.projectId = this.projectId;
param.condition = this.condition;
param.moduleId = param.nodeId;
param.modulePath = param.nodePath;
let url = '/api/definition/batch/editByParams';
if (!this.isMoveBatch)
url = '/api/definition/batch/copy';
@ -929,7 +931,7 @@ export default {
exportTree.splice(i, 1);
}
}
return exportTree;
return exportTree;
},
//
cutDownTree(nodeTree, nodeIdSet) {