|
|
|
@ -197,23 +197,28 @@ public class ProductQueryServiceImpl implements ProductQueryService { |
|
|
|
//特殊处理这么做是不对的 顺序:聊天卡、会员、包恋爱、包领证 |
|
|
|
List<UserPageProductByCustomerGroupVo> sortGroupVoList = new ArrayList<>(); |
|
|
|
//聊天卡 |
|
|
|
UserPageProductByCustomerGroupVo target1Vo = findTargetVo(groupVoList, 0, ProductSubCategoryEnum.CHAT_CARD); |
|
|
|
UserPageProductByCustomerGroupVo target1Vo = findTargetVo(groupVoList, 0, ProductSubCategoryEnum.VIP); |
|
|
|
if (Objects.nonNull(target1Vo)) { |
|
|
|
sortGroupVoList.add(target1Vo); |
|
|
|
} |
|
|
|
//聊天卡 |
|
|
|
UserPageProductByCustomerGroupVo target2Vo = findTargetVo(groupVoList, 0, ProductSubCategoryEnum.CHAT_CARD); |
|
|
|
if (Objects.nonNull(target2Vo)) { |
|
|
|
sortGroupVoList.add(target2Vo); |
|
|
|
} |
|
|
|
//会员 |
|
|
|
sortGroupVoList.addAll(groupVoList.stream().filter(vo -> vo.getGroupType() == 1).collect(Collectors.toList())); |
|
|
|
groupVoList = groupVoList.stream().filter(vo -> vo.getGroupType() != 1).collect(Collectors.toList()); |
|
|
|
//包恋爱 |
|
|
|
UserPageProductByCustomerGroupVo target2Vo = findTargetVo(groupVoList, 0, ProductSubCategoryEnum.CONTRACT_LOVE); |
|
|
|
if (Objects.nonNull(target2Vo)) { |
|
|
|
sortGroupVoList.add(target2Vo); |
|
|
|
} |
|
|
|
//包领证 |
|
|
|
UserPageProductByCustomerGroupVo target3Vo = findTargetVo(groupVoList, 0, ProductSubCategoryEnum.CONTRACTED_MARRIAGE); |
|
|
|
UserPageProductByCustomerGroupVo target3Vo = findTargetVo(groupVoList, 0, ProductSubCategoryEnum.CONTRACT_LOVE); |
|
|
|
if (Objects.nonNull(target3Vo)) { |
|
|
|
sortGroupVoList.add(target3Vo); |
|
|
|
} |
|
|
|
//包领证 |
|
|
|
UserPageProductByCustomerGroupVo target4Vo = findTargetVo(groupVoList, 0, ProductSubCategoryEnum.CONTRACTED_MARRIAGE); |
|
|
|
if (Objects.nonNull(target4Vo)) { |
|
|
|
sortGroupVoList.add(target4Vo); |
|
|
|
} |
|
|
|
sortGroupVoList.addAll(groupVoList); |
|
|
|
groupVoList = sortGroupVoList; |
|
|
|
return groupVoList; |
|
|
|
|