Subversion Repositories SmartDukaan

Rev

Rev 35888 | Rev 35892 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35888 Rev 35891
Line 647... Line 647...
647
            message = "Partner(s) removed from Offer #" + offerId + ". New Offer #" + newOfferId + " created (Unpublished).";
647
            message = "Partner(s) removed from Offer #" + offerId + ". New Offer #" + newOfferId + " created (Unpublished).";
648
        } else {
648
        } else {
649
            message = "Partner(s) removed from Offer #" + offerId + ".";
649
            message = "Partner(s) removed from Offer #" + offerId + ".";
650
        }
650
        }
651
 
651
 
652
        oneDayCacheManager.getCache("allOffers").evict(ym);
-
 
653
        redisCacheManager.getCache("catalog.published_yearmonth").evict(ym);
-
 
654
        redisShortCacheManager.getCache("publishedOffersWithAchievement").clear();
-
 
655
 
-
 
656
        Map<String, Object> response = new HashMap<>();
652
        Map<String, Object> response = new HashMap<>();
657
        response.put("message", message);
653
        response.put("message", message);
658
        response.put("newOfferId", newOfferId);
654
        response.put("newOfferId", newOfferId);
659
        response.put("yearMonth", ym.toString());
655
        response.put("yearMonth", ym.toString());
660
        return responseSender.ok(response);
656
        return responseSender.ok(response);
Line 669... Line 665...
669
        }
665
        }
670
        offerService.addPartnersToOffer(offerId, fofoIds);
666
        offerService.addPartnersToOffer(offerId, fofoIds);
671
 
667
 
672
        Offer offer = offerRepository.selectById(offerId);
668
        Offer offer = offerRepository.selectById(offerId);
673
        YearMonth ym = YearMonth.from(offer.getStartDate());
669
        YearMonth ym = YearMonth.from(offer.getStartDate());
674
        oneDayCacheManager.getCache("allOffers").evict(ym);
-
 
675
        redisCacheManager.getCache("catalog.published_yearmonth").evict(ym);
-
 
676
        redisShortCacheManager.getCache("publishedOffersWithAchievement").clear();
-
 
677
 
670
 
678
        Map<String, Object> response = new HashMap<>();
671
        Map<String, Object> response = new HashMap<>();
679
        response.put("message", "Partner(s) added to Offer #" + offerId + ".");
672
        response.put("message", "Partner(s) added to Offer #" + offerId + ".");
680
        response.put("yearMonth", ym.toString());
673
        response.put("yearMonth", ym.toString());
681
        return responseSender.ok(response);
674
        return responseSender.ok(response);