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.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -12,8 +11,7 @@ public class ApiEditPosRequest extends PosRequest implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "模块id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition.module_id.not_blank}")
|
||||
@Schema(description = "模块id 模块树列表拖拽的时候 这个字段必传 ,其他情况不传")
|
||||
private String moduleId;
|
||||
|
||||
}
|
||||
|
|
|
@ -1057,8 +1057,9 @@ public class ApiDefinitionService extends MoveNodeService {
|
|||
|
||||
public void editPos(ApiEditPosRequest request, String userId) {
|
||||
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());
|
||||
apiDefinition.setModuleId(request.getModuleId());
|
||||
apiDefinition.setUpdateTime(System.currentTimeMillis());
|
||||
apiDefinition.setUpdateUser(userId);
|
||||
apiDefinitionMapper.updateByPrimaryKeySelective(apiDefinition);
|
||||
|
|
|
@ -764,7 +764,6 @@
|
|||
try {
|
||||
await sortDefinition({
|
||||
...params,
|
||||
moduleId: moduleIds.value[0] || '',
|
||||
});
|
||||
Message.success(t('caseManagement.featureCase.sortSuccess'));
|
||||
} catch (error) {
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
const columns: MsTableColumn = [
|
||||
{
|
||||
title: 'ID',
|
||||
dataIndex: 'id',
|
||||
slotName: 'id',
|
||||
dataIndex: 'num',
|
||||
slotName: 'num',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
|
@ -62,18 +62,18 @@
|
|||
},
|
||||
{
|
||||
title: 'apiTestManagement.quoteType',
|
||||
dataIndex: 'quoteType',
|
||||
dataIndex: 'refType',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'apiTestManagement.belongOrg',
|
||||
dataIndex: 'belongOrg',
|
||||
dataIndex: 'organizationName',
|
||||
showTooltip: true,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: 'apiTestManagement.belongProject',
|
||||
dataIndex: 'belongProject',
|
||||
dataIndex: 'projectName',
|
||||
showTooltip: true,
|
||||
width: 150,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue