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