TASK:mannequin;
This commit is contained in:
@@ -694,6 +694,7 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
|||||||
projectMapper.updateById(project);
|
projectMapper.updateById(project);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Objects.nonNull(projectDTO.getWorkspace())) {
|
||||||
QueryWrapper<Workspace> qw = new QueryWrapper<>();
|
QueryWrapper<Workspace> qw = new QueryWrapper<>();
|
||||||
qw.lambda().eq(Workspace::getProjectId, projectDTO.getId());
|
qw.lambda().eq(Workspace::getProjectId, projectDTO.getId());
|
||||||
List<Workspace> workspaces = workspaceMapper.selectList(qw);
|
List<Workspace> workspaces = workspaceMapper.selectList(qw);
|
||||||
@@ -706,7 +707,6 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
|||||||
workspace.setUpdateTime(LocalDateTime.now());
|
workspace.setUpdateTime(LocalDateTime.now());
|
||||||
workspaceMapper.updateById(workspaceNew);
|
workspaceMapper.updateById(workspaceNew);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (projectDTO.getStyleId() != null) {
|
if (projectDTO.getStyleId() != null) {
|
||||||
QueryWrapper<WorkspaceRelStyle> wRSQW = new QueryWrapper<>();
|
QueryWrapper<WorkspaceRelStyle> wRSQW = new QueryWrapper<>();
|
||||||
wRSQW.lambda().eq(WorkspaceRelStyle::getWorkspaceId, projectDTO.getWorkspace().getId());
|
wRSQW.lambda().eq(WorkspaceRelStyle::getWorkspaceId, projectDTO.getWorkspace().getId());
|
||||||
@@ -733,8 +733,9 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
|||||||
}
|
}
|
||||||
Long workspaceId = workspaceService.getByProjectId(projectId);
|
Long workspaceId = workspaceService.getByProjectId(projectId);
|
||||||
WorkspaceVO byIdForProject = workspaceService.getByIdForProject(workspaceId);
|
WorkspaceVO byIdForProject = workspaceService.getByIdForProject(workspaceId);
|
||||||
vo.setId(projectId);
|
|
||||||
vo.setWorkspaceVO(byIdForProject);
|
vo.setWorkspaceVO(byIdForProject);
|
||||||
|
}
|
||||||
|
vo.setId(projectId);
|
||||||
return vo;
|
return vo;
|
||||||
}else {
|
}else {
|
||||||
Project project = CopyUtil.copyObject(projectDTO, Project.class);
|
Project project = CopyUtil.copyObject(projectDTO, Project.class);
|
||||||
@@ -744,6 +745,7 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
|||||||
project.setUpdateTime(now);
|
project.setUpdateTime(now);
|
||||||
projectMapper.insert(project);
|
projectMapper.insert(project);
|
||||||
|
|
||||||
|
if (Objects.nonNull(projectDTO.getWorkspace())) {
|
||||||
Workspace workspace = CopyUtil.copyObject(projectDTO.getWorkspace(), Workspace.class);
|
Workspace workspace = CopyUtil.copyObject(projectDTO.getWorkspace(), Workspace.class);
|
||||||
workspace.setIsLastIndex(0);
|
workspace.setIsLastIndex(0);
|
||||||
workspace.setAccountId(userInfo.getId());
|
workspace.setAccountId(userInfo.getId());
|
||||||
@@ -772,8 +774,9 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
|||||||
workspaceRelStyleMapper.insert(rel);
|
workspaceRelStyleMapper.insert(rel);
|
||||||
}
|
}
|
||||||
WorkspaceVO byIdForProject = workspaceService.getByIdForProject(workspace.getId());
|
WorkspaceVO byIdForProject = workspaceService.getByIdForProject(workspace.getId());
|
||||||
vo.setId(project.getId());
|
|
||||||
vo.setWorkspaceVO(byIdForProject);
|
vo.setWorkspaceVO(byIdForProject);
|
||||||
|
}
|
||||||
|
vo.setId(project.getId());
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user