|
|
@@ -79,6 +79,7 @@ public class ProjectLibManage { |
|
|
|
|
|
|
|
public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) { |
|
|
|
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); |
|
|
|
query.eq(Project::getNewest,Boolean.TRUE); |
|
|
|
Page<Project> page = projectService.page(req.page(), query); |
|
|
|
long total; |
|
|
|
if ((total = page.getTotal()) == 0) { |
|
|
@@ -297,12 +298,12 @@ public class ProjectLibManage { |
|
|
|
if(Objects.nonNull(statusCode)){ |
|
|
|
project.setStatus(statusCode); |
|
|
|
} |
|
|
|
projectService.save(project); |
|
|
|
|
|
|
|
projectService.update(Wrappers.lambdaUpdate(Project.class) |
|
|
|
.set(Project::getNewest,Boolean.FALSE) |
|
|
|
.ne(Project::getId,project.getId()) |
|
|
|
.eq(Project::getProjectCode,project.getProjectCode())); |
|
|
|
if(projectService.save(project)){ |
|
|
|
projectService.update(Wrappers.lambdaUpdate(Project.class) |
|
|
|
.set(Project::getNewest,Boolean.FALSE) |
|
|
|
.ne(Project::getId,project.getId()) |
|
|
|
.eq(Project::getProjectCode,project.getProjectCode())); |
|
|
|
} |
|
|
|
|
|
|
|
return project; |
|
|
|
} |
|
|
|