public class PetController {
public Result<List<PetVO>> getPets() {
Map<Long, Discount> petDiscount = discountManager
.filter(discount -> discount.getExpired() == 0)
.collect(Collectors.toMap(
List<PetVO> pets = petManager
PetVO petVO = PetVO.from(pet);
Discount discount = petDiscount.get(pet.getId());
if (null != discount && null != discount.getDiscountPrice() && discount.getDiscountPrice() > 0L) {
petVO.setDiscountPrice(discount.getDiscountPrice());
.collect(Collectors.toList());
return Result.success(pets);