| Line 167... |
Line 167... |
| 167 |
offerRepository.persist(offer);
|
167 |
offerRepository.persist(offer);
|
| 168 |
createOfferRequest.setId(offer.getId());
|
168 |
createOfferRequest.setId(offer.getId());
|
| 169 |
}
|
169 |
}
|
| 170 |
|
170 |
|
| 171 |
@Override
|
171 |
@Override
|
| 172 |
@Cacheable(value = "publishedOffersWithAchievement", cacheManager = "redisShortCacheManager")
|
172 |
@Cacheable(value = "publishedOffersWithAchievement", cacheManager = "oneDayCacheManager")
|
| 173 |
public List<CreateOfferRequest> getPublishedOffers(int fofoId, YearMonth yearMonth) throws ProfitMandiBusinessException {
|
173 |
public List<CreateOfferRequest> getPublishedOffers(int fofoId, YearMonth yearMonth) throws ProfitMandiBusinessException {
|
| 174 |
Map<Integer, List<Offer>> publishedMapByPartner = offerRepository.selectAllPublishedMapByPartner(yearMonth);
|
174 |
Map<Integer, List<Offer>> publishedMapByPartner = offerRepository.selectAllPublishedMapByPartner(yearMonth);
|
| 175 |
List<Offer> publishedOffers = publishedMapByPartner != null ? publishedMapByPartner.get(fofoId) : null;
|
175 |
List<Offer> publishedOffers = publishedMapByPartner != null ? publishedMapByPartner.get(fofoId) : null;
|
| 176 |
List<CreateOfferRequest> createOfferRequests = new ArrayList<>();
|
176 |
List<CreateOfferRequest> createOfferRequests = new ArrayList<>();
|
| 177 |
if (publishedOffers != null) {
|
177 |
if (publishedOffers != null) {
|