| | |
| | | return dto; |
| | | } |
| | | |
| | | public List<FlowerCategoryTreeDTO> selectCategoryList(FlowerCategoryQueryDTO dto){ |
| | | return categoryMapper.selectCategoryList(dto); |
| | | } |
| | | |
| | | public List<FlowerCategoryTreeDTO> selectCategoryTree(FlowerCategoryQueryDTO dto) { |
| | | List<FlowerCategoryTreeDTO> treeList = categoryMapper.selectTreeList(dto); |
| | | treeList = (List<FlowerCategoryTreeDTO>) TreeBuilderUtil.buildListToTree(treeList); |
| | |
| | | BigDecimal priceHigh = null; |
| | | for (Flower f : ls) { |
| | | BigDecimal price = getFinalPrice(partnerId, categoryId, f.getId(), f.getPrice(), f.getLevel()); |
| | | if(priceLow == null || priceLow.doubleValue() > price.doubleValue()){ |
| | | if(priceLow == null || priceLow.compareTo(price) > 0){ |
| | | priceLow = price; |
| | | } |
| | | |
| | | if(priceHigh == null || priceHigh.doubleValue() < price.doubleValue()){ |
| | | if(priceHigh == null || priceHigh.compareTo(price) < 0){ |
| | | priceHigh = price; |
| | | } |
| | | } |