Subversion Repositories SmartDukaan

Rev

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

Rev 29785 Rev 29809
Line 20... Line 20...
20
 
20
 
21
import org.apache.commons.io.output.ByteArrayOutputStream;
21
import org.apache.commons.io.output.ByteArrayOutputStream;
22
import org.apache.logging.log4j.LogManager;
22
import org.apache.logging.log4j.LogManager;
23
import org.apache.logging.log4j.Logger;
23
import org.apache.logging.log4j.Logger;
24
import org.springframework.beans.factory.annotation.Autowired;
24
import org.springframework.beans.factory.annotation.Autowired;
-
 
25
import org.springframework.cache.CacheManager;
25
import org.springframework.core.io.InputStreamResource;
26
import org.springframework.core.io.InputStreamResource;
26
import org.springframework.http.HttpHeaders;
27
import org.springframework.http.HttpHeaders;
27
import org.springframework.http.HttpStatus;
28
import org.springframework.http.HttpStatus;
28
import org.springframework.http.ResponseEntity;
29
import org.springframework.http.ResponseEntity;
29
import org.springframework.stereotype.Controller;
30
import org.springframework.stereotype.Controller;
Line 100... Line 101...
100
	@Autowired
101
	@Autowired
101
	private CookiesProcessor cookiesProcessor;
102
	private CookiesProcessor cookiesProcessor;
102
 
103
 
103
	@Autowired
104
	@Autowired
104
	private OfferService offerService;
105
	private OfferService offerService;
-
 
106
	
-
 
107
	@Autowired
-
 
108
	private CacheManager thirtyMinsTimeOutCacheManager;
105
 
109
 
106
	@Autowired
110
	@Autowired
107
	private PartnerTypeChangeService partnerTypeChangeService;
111
	private PartnerTypeChangeService partnerTypeChangeService;
108
 
112
 
109
	@RequestMapping(value = "/getCreateOffer", method = RequestMethod.GET)
113
	@RequestMapping(value = "/getCreateOffer", method = RequestMethod.GET)
Line 129... Line 133...
129
	@RequestMapping(value = "/createOffer", method = RequestMethod.POST)
133
	@RequestMapping(value = "/createOffer", method = RequestMethod.POST)
130
	public String createOffer(HttpServletRequest request, @RequestBody CreateOfferRequest createOfferRequest,
134
	public String createOffer(HttpServletRequest request, @RequestBody CreateOfferRequest createOfferRequest,
131
			Model model) throws Exception {
135
			Model model) throws Exception {
132
		LOGGER.info("createOfferRequest [{}]", createOfferRequest);
136
		LOGGER.info("createOfferRequest [{}]", createOfferRequest);
133
		offerService.addOfferService(createOfferRequest);
137
		offerService.addOfferService(createOfferRequest);
-
 
138
		thirtyMinsTimeOutCacheManager.getCache("allOffers").evict(YearMonth.now());
134
		model.addAttribute("response", mvcResponseSender.createResponseString(true));
139
		model.addAttribute("response", mvcResponseSender.createResponseString(true));
135
		return "response";
140
		return "response";
136
 
141
 
137
	}
142
	}
138
 
143