| Line 2... |
Line 2... |
| 2 |
|
2 |
|
| 3 |
import java.util.ArrayList;
|
3 |
import java.util.ArrayList;
|
| 4 |
import java.util.Arrays;
|
4 |
import java.util.Arrays;
|
| 5 |
import java.util.HashMap;
|
5 |
import java.util.HashMap;
|
| 6 |
import java.util.HashSet;
|
6 |
import java.util.HashSet;
|
| 7 |
import java.util.Iterator;
|
- |
|
| 8 |
import java.util.List;
|
7 |
import java.util.List;
|
| 9 |
import java.util.Map;
|
8 |
import java.util.Map;
|
| 10 |
import java.util.Set;
|
9 |
import java.util.Set;
|
| 11 |
import java.util.stream.Collectors;
|
10 |
import java.util.stream.Collectors;
|
| 12 |
|
11 |
|
| Line 22... |
Line 21... |
| 22 |
import org.springframework.beans.factory.annotation.Value;
|
21 |
import org.springframework.beans.factory.annotation.Value;
|
| 23 |
import org.springframework.http.MediaType;
|
22 |
import org.springframework.http.MediaType;
|
| 24 |
import org.springframework.http.ResponseEntity;
|
23 |
import org.springframework.http.ResponseEntity;
|
| 25 |
import org.springframework.stereotype.Controller;
|
24 |
import org.springframework.stereotype.Controller;
|
| 26 |
import org.springframework.transaction.annotation.Transactional;
|
25 |
import org.springframework.transaction.annotation.Transactional;
|
| 27 |
import org.springframework.web.bind.annotation.PathVariable;
|
- |
|
| 28 |
import org.springframework.web.bind.annotation.RequestBody;
|
26 |
import org.springframework.web.bind.annotation.RequestBody;
|
| 29 |
import org.springframework.web.bind.annotation.RequestMapping;
|
27 |
import org.springframework.web.bind.annotation.RequestMapping;
|
| 30 |
import org.springframework.web.bind.annotation.RequestMethod;
|
28 |
import org.springframework.web.bind.annotation.RequestMethod;
|
| 31 |
import org.springframework.web.bind.annotation.RequestParam;
|
29 |
import org.springframework.web.bind.annotation.RequestParam;
|
| 32 |
|
30 |
|
| 33 |
import com.eclipsesource.json.Json;
|
- |
|
| 34 |
import com.eclipsesource.json.JsonObject;
|
31 |
import com.eclipsesource.json.JsonObject;
|
| 35 |
import com.google.gson.Gson;
|
32 |
import com.google.gson.Gson;
|
| 36 |
import com.google.gson.reflect.TypeToken;
|
33 |
import com.google.gson.reflect.TypeToken;
|
| 37 |
import com.spice.profitmandi.common.enumuration.SchemeType;
|
34 |
import com.spice.profitmandi.common.enumuration.SchemeType;
|
| 38 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
35 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| Line 47... |
Line 44... |
| 47 |
import com.spice.profitmandi.dao.entity.inventory.ItemAvailabilityCache;
|
44 |
import com.spice.profitmandi.dao.entity.inventory.ItemAvailabilityCache;
|
| 48 |
import com.spice.profitmandi.dao.model.AddCartRequest;
|
45 |
import com.spice.profitmandi.dao.model.AddCartRequest;
|
| 49 |
import com.spice.profitmandi.dao.model.CartItem;
|
46 |
import com.spice.profitmandi.dao.model.CartItem;
|
| 50 |
import com.spice.profitmandi.dao.model.CartItemResponseModel;
|
47 |
import com.spice.profitmandi.dao.model.CartItemResponseModel;
|
| 51 |
import com.spice.profitmandi.dao.model.CartResponse;
|
48 |
import com.spice.profitmandi.dao.model.CartResponse;
|
| 52 |
import com.spice.profitmandi.dao.model.UserCart;
|
- |
|
| 53 |
import com.spice.profitmandi.dao.repository.catalog.CategoryRepository;
|
49 |
import com.spice.profitmandi.dao.repository.catalog.CategoryRepository;
|
| 54 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
50 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
| 55 |
import com.spice.profitmandi.dao.repository.catalog.TagListingRepository;
|
51 |
import com.spice.profitmandi.dao.repository.catalog.TagListingRepository;
|
| 56 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
52 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
| 57 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
53 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
| 58 |
import com.spice.profitmandi.dao.repository.fofo.CurrentInventorySnapshotRepository;
|
54 |
import com.spice.profitmandi.dao.repository.fofo.CurrentInventorySnapshotRepository;
|
| 59 |
import com.spice.profitmandi.dao.repository.inventory.ItemAvailabilityCacheRepository;
|
55 |
import com.spice.profitmandi.dao.repository.inventory.ItemAvailabilityCacheRepository;
|
| 60 |
import com.spice.profitmandi.service.authentication.RoleManager;
|
56 |
import com.spice.profitmandi.service.authentication.RoleManager;
|
| 61 |
import com.spice.profitmandi.service.inventory.AvailabilityInfo;
|
- |
|
| 62 |
import com.spice.profitmandi.service.inventory.FofoAvailabilityInfo;
|
57 |
import com.spice.profitmandi.service.inventory.FofoAvailabilityInfo;
|
| 63 |
import com.spice.profitmandi.service.inventory.FofoCatalogResponse;
|
58 |
import com.spice.profitmandi.service.inventory.FofoCatalogResponse;
|
| 64 |
import com.spice.profitmandi.service.pricing.PricingService;
|
59 |
import com.spice.profitmandi.service.pricing.PricingService;
|
| 65 |
import com.spice.profitmandi.web.res.DealBrands;
|
60 |
import com.spice.profitmandi.web.res.DealBrands;
|
| 66 |
import com.spice.profitmandi.web.res.DealObjectResponse;
|
61 |
import com.spice.profitmandi.web.res.DealObjectResponse;
|
| Line 224... |
Line 219... |
| 224 |
}.getType());
|
219 |
}.getType());
|
| 225 |
|
220 |
|
| 226 |
return responseSender.ok(dealBrandsResponse);
|
221 |
return responseSender.ok(dealBrandsResponse);
|
| 227 |
}
|
222 |
}
|
| 228 |
|
223 |
|
| 229 |
@RequestMapping(value = "/store/cart", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
224 |
@RequestMapping(value = "/store/cart", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 230 |
@ApiImplicitParams({
|
225 |
@ApiImplicitParams({
|
| 231 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
226 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
| 232 |
@ApiOperation(value = "Get brand list and count for category")
|
227 |
@ApiOperation(value = "Get brand list and count for category")
|
| 233 |
public ResponseEntity<?> cart(HttpServletRequest request, @RequestBody AddCartRequest cartRequest)
|
228 |
public ResponseEntity<?> cart(HttpServletRequest request, @RequestBody AddCartRequest cartRequest)
|
| 234 |
throws Exception {
|
229 |
throws Exception {
|