| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public PageInfo<GoodsVO> goodsList(Goods search) { |
| | | Integer vipId = 0; |
| | |
| | | @Override |
| | | public int compare(GoodsVO o1, GoodsVO o2) { |
| | | if(null != o1.getSellingPrice() && null != o2.getSellingPrice()){ |
| | | return o1.getSellingPrice().compareTo(o2.getSellingPrice()) * (StringUtils.isNotEmpty(search.getIsAsc()) ? -1 : 1); |
| | | return o1.getSellingPrice().compareTo(o2.getSellingPrice()) * ("desc".equals(search.getIsAsc()) ? -1 : 1); |
| | | } |
| | | if(null == o1.getSellingPrice() && null != o2.getSellingPrice()){ |
| | | return BigDecimal.ZERO.compareTo(o2.getSellingPrice()) * (StringUtils.isNotEmpty(search.getIsAsc()) ? -1 : 1); |
| | | return BigDecimal.ZERO.compareTo(o2.getSellingPrice()) * ("desc".equals(search.getIsAsc()) ? -1 : 1); |
| | | } |
| | | if(null != o1.getSellingPrice() && null == o2.getSellingPrice()){ |
| | | return o1.getSellingPrice().compareTo(BigDecimal.ZERO) * (StringUtils.isNotEmpty(search.getIsAsc()) ? -1 : 1); |
| | | return o1.getSellingPrice().compareTo(BigDecimal.ZERO) * ("desc".equals(search.getIsAsc()) ? -1 : 1); |
| | | } |
| | | return 0; |
| | | } |