BUGFIX:分页查询所有项目历史记录,根据更新时间排序,解决项目记录没有更新时间导致空指针问题
This commit is contained in:
@@ -684,8 +684,10 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
|
||||
designPythonOutfit.setDesignId(null);
|
||||
designPythonOutfit.setDesignItemId(-1L);
|
||||
designPythonOutfit.setCollectionId(null);
|
||||
designPythonOutfit.setCreateDate(LocalDateTime.now());
|
||||
|
||||
designPythonOutfit.setId(null);
|
||||
// 这里插入的accountId是原作者的(二创),是否需要修改?
|
||||
designPythonOutfitMapper.insert(designPythonOutfit);
|
||||
Long designOutfitIdNew = designPythonOutfit.getId();
|
||||
userLike.setDesignOutfitId(designOutfitIdNew);
|
||||
@@ -698,6 +700,7 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
|
||||
tDesignPythonOutfitDetail.setId(null);
|
||||
tDesignPythonOutfitDetail.setDesignId(null);
|
||||
tDesignPythonOutfitDetail.setDesignPythonOutfitId(designOutfitIdNew);
|
||||
tDesignPythonOutfitDetail.setCreateDate(LocalDateTime.now());
|
||||
designPythonOutfitDetailMapper.insert(tDesignPythonOutfitDetail);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1775,7 +1775,9 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
IPage<ProjectVO> convert = page.convert((Function<Project, ProjectVO>) project -> {
|
||||
if (project != null) {
|
||||
ProjectVO projectVO = CopyUtil.copyObject(project, ProjectVO.class);
|
||||
projectVO.setUpdateDate(project.getUpdateTime().atZone(ZoneId.systemDefault()).toInstant().toEpochMilli());
|
||||
// 用于排序的时间
|
||||
LocalDateTime orderTime = Objects.isNull(project.getUpdateTime()) ? project.getCreateTime() : project.getUpdateTime();
|
||||
projectVO.setUpdateDate(orderTime.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli());
|
||||
|
||||
QueryWrapper<UserLikeGroup> userLikeGroupQueryWrapper1 = new QueryWrapper<>();
|
||||
userLikeGroupQueryWrapper1.lambda().eq(UserLikeGroup::getProjectId, projectVO.getId());
|
||||
|
||||
Reference in New Issue
Block a user