fix:兼容二创设置旧数据没有性别问题
This commit is contained in:
@@ -553,7 +553,7 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
|
|||||||
}
|
}
|
||||||
vo.setCollectionElementList(collectionElementList);
|
vo.setCollectionElementList(collectionElementList);
|
||||||
List<UserLikeSnapshot> userLikeList = projectSnapshot.getUserLikeList();
|
List<UserLikeSnapshot> userLikeList = projectSnapshot.getUserLikeList();
|
||||||
if (userLikeList != null && !userLikeList.isEmpty()){
|
if (userLikeList != null && !userLikeList.isEmpty()) {
|
||||||
List<TDesignPythonOutfit> list = new ArrayList<>();
|
List<TDesignPythonOutfit> list = new ArrayList<>();
|
||||||
for (UserLikeSnapshot userLikeSnapshot : userLikeList) {
|
for (UserLikeSnapshot userLikeSnapshot : userLikeList) {
|
||||||
TDesignPythonOutfit designPythonOutfit = userLikeSnapshot.getDesignPythonOutfit();
|
TDesignPythonOutfit designPythonOutfit = userLikeSnapshot.getDesignPythonOutfit();
|
||||||
@@ -682,6 +682,9 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
|
|||||||
element.setUpdateDate(null);
|
element.setUpdateDate(null);
|
||||||
element.setAccountId(accountId);
|
element.setAccountId(accountId);
|
||||||
element.setProjectId(projectIdNew);
|
element.setProjectId(projectIdNew);
|
||||||
|
if (element.getLevel3Type() == null) {
|
||||||
|
element.setLevel3Type(workspaceOld.getSex());
|
||||||
|
}
|
||||||
collectionElementMapper.insert(element);
|
collectionElementMapper.insert(element);
|
||||||
Long collectionElementNewID = element.getId();
|
Long collectionElementNewID = element.getId();
|
||||||
if (collectionElementRelModelCopy != null) {
|
if (collectionElementRelModelCopy != null) {
|
||||||
@@ -690,6 +693,17 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
|
|||||||
collectionElementRelModelMapper.insert(collectionElementRelModelCopy);
|
collectionElementRelModelMapper.insert(collectionElementRelModelCopy);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
} else if (element.getLevel1Type().equals(CollectionLevel1TypeEnum.SKETCH_BOARD.getRealName())) {
|
||||||
|
// element.setCollectionId(collectionIdNew);
|
||||||
|
if (element.getLevel3Type() == null) {
|
||||||
|
element.setLevel3Type(workspaceOld.getSex());
|
||||||
|
}
|
||||||
|
element.setId(null);
|
||||||
|
element.setCreateDate(new Date());
|
||||||
|
element.setUpdateDate(null);
|
||||||
|
element.setAccountId(accountId);
|
||||||
|
element.setProjectId(projectIdNew);
|
||||||
|
collectionElementMapper.insert(element);
|
||||||
} else {
|
} else {
|
||||||
// element.setCollectionId(collectionIdNew);
|
// element.setCollectionId(collectionIdNew);
|
||||||
element.setId(null);
|
element.setId(null);
|
||||||
@@ -751,9 +765,9 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
|
|||||||
List<CollectionElement> modelTypeElements = collectionElementListOld.stream()
|
List<CollectionElement> modelTypeElements = collectionElementListOld.stream()
|
||||||
.filter(element -> element.getLevel1Type().equals(CollectionLevel1TypeEnum.MODEL.getRealName()))
|
.filter(element -> element.getLevel1Type().equals(CollectionLevel1TypeEnum.MODEL.getRealName()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (CollectionUtil.isNotEmpty(modelTypeElements)){
|
if (CollectionUtil.isNotEmpty(modelTypeElements)) {
|
||||||
design.setSingleOverall("overall");
|
design.setSingleOverall("overall");
|
||||||
}else {
|
} else {
|
||||||
design.setSingleOverall("single");
|
design.setSingleOverall("single");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user