Commit f68f200e authored by shiyu's avatar shiyu

查询可交换商品时默认标签去除拍卖中、已结缘、我收藏的

parent 9c46d2fd
...@@ -75,4 +75,10 @@ public class CollectionBookRequestDto extends BaseRequestDto implements Entity ...@@ -75,4 +75,10 @@ public class CollectionBookRequestDto extends BaseRequestDto implements Entity
* 1:展示默认的标签,为空不展示 * 1:展示默认的标签,为空不展示
*/ */
private Integer viewLabelType; private Integer viewLabelType;
/**
* 类型
* 1交换商品,排除默认标签
*/
private Integer type;
} }
...@@ -124,18 +124,27 @@ public class CollectionBookServiceImpl implements CollectionBookService { ...@@ -124,18 +124,27 @@ public class CollectionBookServiceImpl implements CollectionBookService {
if (dto.getViewLabelType().intValue() == 1) { if (dto.getViewLabelType().intValue() == 1) {
if (collectorWhiteListDao.isExisted(userId)) { if (collectorWhiteListDao.isExisted(userId)) {
for (CollectionBookConstants.DefaultBookEnum defaultBookEnum : CollectionBookConstants.DefaultBookEnum.values()) { for (CollectionBookConstants.DefaultBookEnum defaultBookEnum : CollectionBookConstants.DefaultBookEnum.values()) {
Map<String, Object> map = new HashMap<>(); if (dto.getType() != null && dto.getType() == 1) {
map.put("id", defaultBookEnum.getId()); if (CollectionBookConstants.DefaultBookEnum.FINISHED.getId().intValue() == defaultBookEnum.getId()
map.put("title", defaultBookEnum.getName()); || CollectionBookConstants.DefaultBookEnum.AUCTIONING.getId().intValue() == defaultBookEnum.getId()) {
list.add(map); continue;
} else {
Map<String, Object> map = new HashMap<>();
map.put("id", defaultBookEnum.getId());
map.put("title", defaultBookEnum.getName());
list.add(map);
}
}
} }
} }
} }
if (dto.getIsHasExtraLabel()) { if (dto.getType() != null && dto.getType() != 1) {
Map<String, Object> map = new HashMap<>(); if (dto.getIsHasExtraLabel()) {
map.put("id", 0); Map<String, Object> map = new HashMap<>();
map.put("title", "我收藏的"); map.put("id", 0);
list.add(map); map.put("title", "我收藏的");
list.add(map);
}
} }
collectionBookList.forEach(collectionBook -> { collectionBookList.forEach(collectionBook -> {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment