refactor(接口测试): 优化接口排序
This commit is contained in:
parent
a9d680bacb
commit
effb35b4e1
|
@ -2,7 +2,6 @@ package io.metersphere.api.dto.request;
|
||||||
|
|
||||||
import io.metersphere.system.dto.sdk.request.PosRequest;
|
import io.metersphere.system.dto.sdk.request.PosRequest;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
@ -12,8 +11,7 @@ public class ApiEditPosRequest extends PosRequest implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Schema(description = "模块id", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "模块id 模块树列表拖拽的时候 这个字段必传 ,其他情况不传")
|
||||||
@NotBlank(message = "{api_definition.module_id.not_blank}")
|
|
||||||
private String moduleId;
|
private String moduleId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1057,8 +1057,9 @@ public class ApiDefinitionService extends MoveNodeService {
|
||||||
|
|
||||||
public void editPos(ApiEditPosRequest request, String userId) {
|
public void editPos(ApiEditPosRequest request, String userId) {
|
||||||
ApiDefinition apiDefinition = checkApiDefinition(request.getMoveId());
|
ApiDefinition apiDefinition = checkApiDefinition(request.getMoveId());
|
||||||
if (!StringUtils.equals(request.getModuleId(), apiDefinition.getModuleId())) {
|
if (StringUtils.isNotBlank(request.getModuleId()) && !StringUtils.equals(request.getModuleId(), apiDefinition.getModuleId())) {
|
||||||
checkModuleExist(request.getModuleId());
|
checkModuleExist(request.getModuleId());
|
||||||
|
apiDefinition.setModuleId(request.getModuleId());
|
||||||
apiDefinition.setUpdateTime(System.currentTimeMillis());
|
apiDefinition.setUpdateTime(System.currentTimeMillis());
|
||||||
apiDefinition.setUpdateUser(userId);
|
apiDefinition.setUpdateUser(userId);
|
||||||
apiDefinitionMapper.updateByPrimaryKeySelective(apiDefinition);
|
apiDefinitionMapper.updateByPrimaryKeySelective(apiDefinition);
|
||||||
|
|
|
@ -764,7 +764,6 @@
|
||||||
try {
|
try {
|
||||||
await sortDefinition({
|
await sortDefinition({
|
||||||
...params,
|
...params,
|
||||||
moduleId: moduleIds.value[0] || '',
|
|
||||||
});
|
});
|
||||||
Message.success(t('caseManagement.featureCase.sortSuccess'));
|
Message.success(t('caseManagement.featureCase.sortSuccess'));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -45,8 +45,8 @@
|
||||||
const columns: MsTableColumn = [
|
const columns: MsTableColumn = [
|
||||||
{
|
{
|
||||||
title: 'ID',
|
title: 'ID',
|
||||||
dataIndex: 'id',
|
dataIndex: 'num',
|
||||||
slotName: 'id',
|
slotName: 'num',
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -62,18 +62,18 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'apiTestManagement.quoteType',
|
title: 'apiTestManagement.quoteType',
|
||||||
dataIndex: 'quoteType',
|
dataIndex: 'refType',
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'apiTestManagement.belongOrg',
|
title: 'apiTestManagement.belongOrg',
|
||||||
dataIndex: 'belongOrg',
|
dataIndex: 'organizationName',
|
||||||
showTooltip: true,
|
showTooltip: true,
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'apiTestManagement.belongProject',
|
title: 'apiTestManagement.belongProject',
|
||||||
dataIndex: 'belongProject',
|
dataIndex: 'projectName',
|
||||||
showTooltip: true,
|
showTooltip: true,
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue