| 36321 |
vikas |
1 |
package com.spice.profitmandi.web.v2.controller;
|
|
|
2 |
|
|
|
3 |
import com.spice.profitmandi.web.controller.guest.GuestController;
|
|
|
4 |
import com.spice.profitmandi.web.v2.response.ApiResponse;
|
|
|
5 |
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
6 |
import org.springframework.http.ResponseEntity;
|
|
|
7 |
import org.springframework.web.bind.annotation.*;
|
|
|
8 |
|
|
|
9 |
import javax.servlet.http.HttpServletRequest;
|
|
|
10 |
|
|
|
11 |
@RestController
|
|
|
12 |
@RequestMapping("/v2")
|
|
|
13 |
public class V2GuestController extends V2BaseController {
|
|
|
14 |
|
|
|
15 |
@Autowired
|
|
|
16 |
private GuestController guestController;
|
|
|
17 |
|
|
|
18 |
@GetMapping("/guest/deals")
|
|
|
19 |
public ResponseEntity<ApiResponse<?>> getFofo(HttpServletRequest request,
|
|
|
20 |
@RequestParam(value = "categoryId", required = false, defaultValue = "3") String categoryId,
|
|
|
21 |
@RequestParam(value = "offset") int offset,
|
|
|
22 |
@RequestParam(value = "limit") int limit,
|
|
|
23 |
@RequestParam(value = "sort", required = false) String sort,
|
|
|
24 |
@RequestParam(value = "brand", required = false) String brand,
|
|
|
25 |
@RequestParam(value = "subCategoryId", required = false) int subCategoryId,
|
|
|
26 |
@RequestParam(value = "q", required = false) String queryTerm,
|
|
|
27 |
@RequestParam(value = "hotDeal", required = false) boolean hotDeal,
|
|
|
28 |
@RequestParam(value = "endPoint", required = false) String endPoint,
|
|
|
29 |
@RequestParam(value = "group", required = false) boolean group) throws Throwable {
|
|
|
30 |
return wrapResponse(guestController.getFofo(request, categoryId, offset, limit, sort, brand, subCategoryId, queryTerm, hotDeal, endPoint, group));
|
|
|
31 |
}
|
|
|
32 |
}
|