Commit 4a6edec8 authored by 盖献康's avatar 盖献康

Merge branch 'gaixiankang' into 'dev'

测试矩阵 - ID返回值变为科恩数据

See merge request !203
parents 8fe49413 6b99ab2b
...@@ -87,6 +87,9 @@ public class TestUseCase implements Serializable { ...@@ -87,6 +87,9 @@ public class TestUseCase implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private String testType; private String testType;
@ApiModelProperty("用例ID")
private String caseId;
/** /**
* 返回用例在矩阵中的坐标 * 返回用例在矩阵中的坐标
* @return * @return
......
...@@ -73,8 +73,8 @@ public class MatrixServiceImpl implements MatrixService { ...@@ -73,8 +73,8 @@ public class MatrixServiceImpl implements MatrixService {
for(TestType type : types) { for(TestType type : types) {
String columnId = String.valueOf(type.getId()); String columnId = String.valueOf(type.getId());
String coordinates = scenario.getId() + columnId; String coordinates = scenario.getId() + columnId;
Long useCaseId = getUseCaseIdByCoordinates(useCases, coordinates); String useCaseId = getUseCaseIdByCoordinates(useCases, coordinates);
row.put(columnId, useCaseId == null ? "" : String.valueOf(useCaseId)); row.put(columnId, useCaseId == null ? "" : useCaseId);
} }
rows.add(row); rows.add(row);
...@@ -83,11 +83,11 @@ public class MatrixServiceImpl implements MatrixService { ...@@ -83,11 +83,11 @@ public class MatrixServiceImpl implements MatrixService {
response.setRows(rows); response.setRows(rows);
} }
public Long getUseCaseIdByCoordinates(List<TestUseCase> useCases, String coordinates) { public String getUseCaseIdByCoordinates(List<TestUseCase> useCases, String coordinates) {
for(TestUseCase useCase : useCases) { for(TestUseCase useCase : useCases) {
if(useCase.getCoordinates().equals(coordinates)) { if(useCase.getCoordinates().equals(coordinates)) {
return useCase.getId(); return useCase.getCaseId();
} }
} }
return null; return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment