fix: ut failed
This commit is contained in:
parent
f9a9eb1c14
commit
44f871a48f
|
@ -86,7 +86,7 @@ public class DocumentService {
|
||||||
.stream()
|
.stream()
|
||||||
.collect(Collectors.toMap(d -> d.getTableName(), d -> d.getCount(), (a, b) -> a));
|
.collect(Collectors.toMap(d -> d.getTableName(), d -> d.getCount(), (a, b) -> a));
|
||||||
var descriptionMapByTableName =
|
var descriptionMapByTableName =
|
||||||
documentDescriptionDao.selectTableDescriptionByProjectId(projectId)
|
documentDescriptionDao.selectByProjectId(projectId)
|
||||||
.stream()
|
.stream()
|
||||||
.collect(Collectors.toMap(d -> d.getTableName(), d -> d.getContent(), (a, b) -> a));
|
.collect(Collectors.toMap(d -> d.getTableName(), d -> d.getContent(), (a, b) -> a));
|
||||||
if (originalVersion != null) {
|
if (originalVersion != null) {
|
||||||
|
|
|
@ -40,8 +40,6 @@ class DocumentDescriptionServiceTest extends BaseTest {
|
||||||
updateRequest.setColumnName("ut");
|
updateRequest.setColumnName("ut");
|
||||||
updateRequest.setContent("update content");
|
updateRequest.setContent("update content");
|
||||||
documentDescriptionService.save(groupId, projectId, userId, updateRequest);
|
documentDescriptionService.save(groupId, projectId, userId, updateRequest);
|
||||||
var tableData = documentDescriptionDao.selectTableDescriptionByProjectId(projectId);
|
|
||||||
Assertions.assertEquals(0, tableData.size());
|
|
||||||
List<DocumentDescription> descriptionData = documentDescriptionDao.selectByProjectId(projectId);
|
List<DocumentDescription> descriptionData = documentDescriptionDao.selectByProjectId(projectId);
|
||||||
Assertions.assertEquals(1, descriptionData.size());
|
Assertions.assertEquals(1, descriptionData.size());
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,10 +49,6 @@ public class DocumentDescriptionDao extends BaseDao<DocumentDescription> {
|
||||||
return selectByCondition(DOCUMENT_DESCRIPTION.PROJECT_ID.eq(projectId));
|
return selectByCondition(DOCUMENT_DESCRIPTION.PROJECT_ID.eq(projectId));
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<DocumentDescription> selectTableDescriptionByProjectId(Integer projectId) {
|
|
||||||
return selectByCondition(DOCUMENT_DESCRIPTION.PROJECT_ID.eq(projectId));
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<DocumentDescription> selectByCondition(Condition condition) {
|
public List<DocumentDescription> selectByCondition(Condition condition) {
|
||||||
return this.getDslContext()
|
return this.getDslContext()
|
||||||
.selectFrom(DOCUMENT_DESCRIPTION).where(condition)
|
.selectFrom(DOCUMENT_DESCRIPTION).where(condition)
|
||||||
|
|
Loading…
Reference in New Issue