refactor(项目管理): 更新项目关联资源池默认值
This commit is contained in:
parent
7a9a2d74f2
commit
041df4c6e8
|
@ -283,6 +283,7 @@ public class CommonProjectService {
|
|||
project.setDescription(updateProjectDto.getDescription());
|
||||
project.setOrganizationId(updateProjectDto.getOrganizationId());
|
||||
project.setEnable(updateProjectDto.getEnable());
|
||||
project.setAllResourcePool(updateProjectDto.isAllResourcePool());
|
||||
project.setUpdateUser(updateUser);
|
||||
project.setCreateUser(null);
|
||||
project.setCreateTime(null);
|
||||
|
|
|
@ -605,6 +605,7 @@ public class OrganizationProjectControllerTests extends BaseTest {
|
|||
ProjectDTO result = parseObjectFromMvcResult(mvcResult, ProjectDTO.class);
|
||||
Project currentProject = projectMapper.selectByPrimaryKey(project.getId());
|
||||
compareProjectDTO(currentProject, result);
|
||||
Assertions.assertFalse(currentProject.getAllResourcePool());
|
||||
UserRoleRelationExample userRoleRelationExample = new UserRoleRelationExample();
|
||||
userRoleRelationExample.createCriteria().andSourceIdEqualTo(projectId).andRoleIdEqualTo(InternalUserRole.PROJECT_ADMIN.getValue());
|
||||
List<UserRoleRelation> userRoleRelations = userRoleRelationMapper.selectByExample(userRoleRelationExample);
|
||||
|
@ -634,9 +635,11 @@ public class OrganizationProjectControllerTests extends BaseTest {
|
|||
moduleIds.add("apiTest");
|
||||
moduleIds.add("uiTest");
|
||||
project.setModuleIds(moduleIds);
|
||||
project.setAllResourcePool(true);
|
||||
mvcResult = this.responsePost(updateProject, project);
|
||||
result = parseObjectFromMvcResult(mvcResult, ProjectDTO.class);
|
||||
currentProject = projectMapper.selectByPrimaryKey(project.getId());
|
||||
Assertions.assertTrue(currentProject.getAllResourcePool());
|
||||
compareProjectDTO(currentProject, result);
|
||||
//断言模块设置
|
||||
projectExtend = projectMapper.selectByPrimaryKey("projectId2");
|
||||
|
|
Loading…
Reference in New Issue