Subversion Repositories SmartDukaan

Rev

Rev 36634 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36634 Rev 36703
Line 212... Line 212...
212
            }
212
            }
213
        }
213
        }
214
        return responseSender.ok(published.size() + " offers published");
214
        return responseSender.ok(published.size() + " offers published");
215
    }
215
    }
216
 
216
 
-
 
217
    /**
-
 
218
     * Evicts month-level offer caches so newly created/modified offers appear in listings.
-
 
219
     * Clears: monthOfferIds (admin list), catalog.published_yearmonth (partner view), todayOffers.
-
 
220
     */
-
 
221
    @RequestMapping(value = "/offer/refreshCache", method = RequestMethod.GET)
-
 
222
    public ResponseEntity<?> refreshOfferCache(@RequestParam YearMonth yearMonth) {
-
 
223
        offerService.evictMonthCaches(yearMonth);
-
 
224
        return responseSender.ok("Offer cache refreshed for " + yearMonth);
-
 
225
    }
-
 
226
 
217
    @RequestMapping(value = "/offer/delete/{offerId}", method = RequestMethod.DELETE)
227
    @RequestMapping(value = "/offer/delete/{offerId}", method = RequestMethod.DELETE)
218
    public ResponseEntity<?> deleteOffer(@PathVariable int offerId) throws ProfitMandiBusinessException {
228
    public ResponseEntity<?> deleteOffer(@PathVariable int offerId) throws ProfitMandiBusinessException {
219
        offerService.deleteOffer(offerId);
229
        offerService.deleteOffer(offerId);
220
        return responseSender.ok(true);
230
        return responseSender.ok(true);
221
    }
231
    }