Commit f68f200e authored by shiyu's avatar shiyu

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

parent 9c46d2fd
......@@ -75,4 +75,10 @@ public class CollectionBookRequestDto extends BaseRequestDto implements Entity
* 1:展示默认的标签,为空不展示
*/
private Integer viewLabelType;
/**
* 类型
* 1交换商品,排除默认标签
*/
private Integer type;
}
......@@ -124,18 +124,27 @@ public class CollectionBookServiceImpl implements CollectionBookService {
if (dto.getViewLabelType().intValue() == 1) {
if (collectorWhiteListDao.isExisted(userId)) {
for (CollectionBookConstants.DefaultBookEnum defaultBookEnum : CollectionBookConstants.DefaultBookEnum.values()) {
Map<String, Object> map = new HashMap<>();
map.put("id", defaultBookEnum.getId());
map.put("title", defaultBookEnum.getName());
list.add(map);
if (dto.getType() != null && dto.getType() == 1) {
if (CollectionBookConstants.DefaultBookEnum.FINISHED.getId().intValue() == defaultBookEnum.getId()
|| CollectionBookConstants.DefaultBookEnum.AUCTIONING.getId().intValue() == defaultBookEnum.getId()) {
continue;
} else {
Map<String, Object> map = new HashMap<>();
map.put("id", defaultBookEnum.getId());
map.put("title", defaultBookEnum.getName());
list.add(map);
}
}
}
}
}
if (dto.getIsHasExtraLabel()) {
Map<String, Object> map = new HashMap<>();
map.put("id", 0);
map.put("title", "我收藏的");
list.add(map);
if (dto.getType() != null && dto.getType() != 1) {
if (dto.getIsHasExtraLabel()) {
Map<String, Object> map = new HashMap<>();
map.put("id", 0);
map.put("title", "我收藏的");
list.add(map);
}
}
collectionBookList.forEach(collectionBook -> {
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