| Line 42... |
Line 42... |
| 42 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
42 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
| 43 |
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
|
43 |
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
|
| 44 |
import com.spice.profitmandi.dao.model.UserCart;
|
44 |
import com.spice.profitmandi.dao.model.UserCart;
|
| 45 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
45 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
| 46 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
46 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
| - |
|
47 |
import com.spice.profitmandi.dao.service.inventory.InventoryService;
|
| 47 |
import com.spice.profitmandi.service.pricing.PricingService;
|
48 |
import com.spice.profitmandi.service.pricing.PricingService;
|
| 48 |
import com.spice.profitmandi.web.res.DealBrands;
|
49 |
import com.spice.profitmandi.web.res.DealBrands;
|
| 49 |
import com.spice.profitmandi.web.res.DealObjectResponse;
|
50 |
import com.spice.profitmandi.web.res.DealObjectResponse;
|
| 50 |
import com.spice.profitmandi.web.res.DealsResponse;
|
51 |
import com.spice.profitmandi.web.res.DealsResponse;
|
| 51 |
import com.spice.profitmandi.web.res.FofoAvailabilityInfo;
|
52 |
import com.spice.profitmandi.web.res.FofoAvailabilityInfo;
|
| Line 76... |
Line 77... |
| 76 |
private UserAccountRepository userAccountRepository;
|
77 |
private UserAccountRepository userAccountRepository;
|
| 77 |
|
78 |
|
| 78 |
@Autowired
|
79 |
@Autowired
|
| 79 |
ResponseSender<?> responseSender;
|
80 |
ResponseSender<?> responseSender;
|
| 80 |
|
81 |
|
| - |
|
82 |
@Autowired
|
| - |
|
83 |
InventoryService inventoryService;
|
| - |
|
84 |
|
| 81 |
|
85 |
|
| 82 |
List<String> filterableParams = Arrays.asList("brand");
|
86 |
List<String> filterableParams = Arrays.asList("brand");
|
| 83 |
|
87 |
|
| 84 |
@RequestMapping(value = ProfitMandiConstants.URL_DEALS, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
88 |
@RequestMapping(value = ProfitMandiConstants.URL_DEALS, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 85 |
@ApiImplicitParams({
|
89 |
@ApiImplicitParams({
|
| Line 197... |
Line 201... |
| 197 |
fdi.setSellingPrice((float)childItem.getDouble("sellingPrice_f"));
|
201 |
fdi.setSellingPrice((float)childItem.getDouble("sellingPrice_f"));
|
| 198 |
fdi.setMop((float)childItem.getDouble("mop_f"));
|
202 |
fdi.setMop((float)childItem.getDouble("mop_f"));
|
| 199 |
fdi.setColor(childItem.has("color_s")?childItem.getString("color_s"): "");
|
203 |
fdi.setColor(childItem.has("color_s")?childItem.getString("color_s"): "");
|
| 200 |
fdi.setTagId(childItem.getInt("tagId_i"));
|
204 |
fdi.setTagId(childItem.getInt("tagId_i"));
|
| 201 |
fdi.setItem_id(itemId);
|
205 |
fdi.setItem_id(itemId);
|
| 202 |
fdi.setAvailability(100);
|
206 |
fdi.setAvailability(inventoryService.getCachedItemAvailabilityCacheByItemId(itemId).getTotalQuantity());
|
| 203 |
fdi.setQuantityStep(1);
|
207 |
fdi.setQuantityStep(1);
|
| 204 |
fdi.setMinBuyQuantity(1);
|
208 |
fdi.setMinBuyQuantity(1);
|
| 205 |
fdi.setMaxQuantity(100);
|
209 |
fdi.setMaxQuantity(100);
|
| 206 |
fofoAvailabilityInfoMap.put(itemId, fdi);
|
210 |
fofoAvailabilityInfoMap.put(itemId, fdi);
|
| 207 |
}
|
211 |
}
|