| Line 22... |
Line 22... |
| 22 |
import org.springframework.beans.factory.annotation.Value;
|
22 |
import org.springframework.beans.factory.annotation.Value;
|
| 23 |
import org.springframework.http.MediaType;
|
23 |
import org.springframework.http.MediaType;
|
| 24 |
import org.springframework.http.ResponseEntity;
|
24 |
import org.springframework.http.ResponseEntity;
|
| 25 |
import org.springframework.stereotype.Controller;
|
25 |
import org.springframework.stereotype.Controller;
|
| 26 |
import org.springframework.transaction.annotation.Transactional;
|
26 |
import org.springframework.transaction.annotation.Transactional;
|
| - |
|
27 |
import org.springframework.web.bind.annotation.PathVariable;
|
| 27 |
import org.springframework.web.bind.annotation.RequestBody;
|
28 |
import org.springframework.web.bind.annotation.RequestBody;
|
| 28 |
import org.springframework.web.bind.annotation.RequestMapping;
|
29 |
import org.springframework.web.bind.annotation.RequestMapping;
|
| 29 |
import org.springframework.web.bind.annotation.RequestMethod;
|
30 |
import org.springframework.web.bind.annotation.RequestMethod;
|
| 30 |
import org.springframework.web.bind.annotation.RequestParam;
|
31 |
import org.springframework.web.bind.annotation.RequestParam;
|
| 31 |
|
32 |
|
| Line 245... |
Line 246... |
| 245 |
|
246 |
|
| 246 |
return responseSender.ok(dealBrandsResponse);
|
247 |
return responseSender.ok(dealBrandsResponse);
|
| 247 |
}
|
248 |
}
|
| 248 |
|
249 |
|
| 249 |
@RequestMapping(value = "/store/tag/{tag}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
250 |
@RequestMapping(value = "/store/tag/{tag}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 250 |
public ResponseEntity<?> bestSellers(HttpServletRequest request, @RequestParam String tag) throws Exception {
|
251 |
public ResponseEntity<?> bestSellers(HttpServletRequest request, @PathVariable String tag) throws Exception {
|
| 251 |
List<FofoCatalogResponse> dealResponse = new ArrayList<>();
|
252 |
List<FofoCatalogResponse> dealResponse = new ArrayList<>();
|
| 252 |
UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
|
253 |
UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
|
| 253 |
// UserCart uc = userAccountRepository.getUserCart(userInfo.getUserId());
|
254 |
// UserCart uc = userAccountRepository.getUserCart(userInfo.getUserId());
|
| 254 |
List<Integer> tagIds = pricingService.getTagsIdsByRetailerId(userInfo.getRetailerId());
|
255 |
List<Integer> tagIds = pricingService.getTagsIdsByRetailerId(userInfo.getRetailerId());
|
| 255 |
RestClient rc = new RestClient();
|
256 |
RestClient rc = new RestClient();
|