List转成TreeSet
//查询订单list
List<OrderPayment> topayList = orderPaymentMapper.queryUnpayOrder();
Set<BigDecimal> storecodes = new TreeSet<>();
//取出订单号->放到treeset里,实现去重
if(null!=topayList&&!topayList.isEmpty()){
storecodes = topayList.stream()
.map(OrderPayment::getStoreCode)
.collect(Collectors.toCollection(TreeSet::new));
}