| Line 36... |
Line 36... |
| 36 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
36 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 37 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
37 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| 38 |
import com.spice.profitmandi.common.model.UserInfo;
|
38 |
import com.spice.profitmandi.common.model.UserInfo;
|
| 39 |
import com.spice.profitmandi.common.web.client.RestClient;
|
39 |
import com.spice.profitmandi.common.web.client.RestClient;
|
| 40 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
40 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
| 41 |
import com.spice.profitmandi.dao.entity.inventory.ItemAvailabilityCache;
|
41 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
| 42 |
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
|
42 |
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
|
| 43 |
import com.spice.profitmandi.dao.model.UserCart;
|
43 |
import com.spice.profitmandi.dao.model.UserCart;
|
| - |
|
44 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
| 44 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
45 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
| 45 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
46 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
| 46 |
import com.spice.profitmandi.dao.repository.inventory.ItemAvailabilityCacheRepository;
|
47 |
import com.spice.profitmandi.dao.repository.inventory.ItemAvailabilityCacheRepository;
|
| 47 |
import com.spice.profitmandi.service.inventory.InventoryService;
|
48 |
import com.spice.profitmandi.service.inventory.InventoryService;
|
| 48 |
import com.spice.profitmandi.service.pricing.PricingService;
|
49 |
import com.spice.profitmandi.service.pricing.PricingService;
|
| Line 89... |
Line 90... |
| 89 |
private ResponseSender<?> responseSender;
|
90 |
private ResponseSender<?> responseSender;
|
| 90 |
|
91 |
|
| 91 |
@Autowired
|
92 |
@Autowired
|
| 92 |
private InventoryService inventoryService;
|
93 |
private InventoryService inventoryService;
|
| 93 |
|
94 |
|
| - |
|
95 |
@Autowired
|
| - |
|
96 |
private ItemRepository itemRepository;
|
| - |
|
97 |
|
| 94 |
|
98 |
|
| 95 |
List<String> filterableParams = Arrays.asList("brand");
|
99 |
List<String> filterableParams = Arrays.asList("brand");
|
| 96 |
|
100 |
|
| 97 |
@RequestMapping(value = ProfitMandiConstants.URL_DEALS, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
101 |
@RequestMapping(value = ProfitMandiConstants.URL_DEALS, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 98 |
@ApiImplicitParams({
|
102 |
@ApiImplicitParams({
|
| Line 214... |
Line 218... |
| 214 |
totalAvailability = iac.getTotalAvailability();
|
218 |
totalAvailability = iac.getTotalAvailability();
|
| 215 |
} catch (Exception e) {}
|
219 |
} catch (Exception e) {}
|
| 216 |
if(totalAvailability <= 0){
|
220 |
if(totalAvailability <= 0){
|
| 217 |
continue;
|
221 |
continue;
|
| 218 |
}*/
|
222 |
}*/
|
| - |
|
223 |
Item item = itemRepository.selectById(itemId);
|
| - |
|
224 |
//In case its tampered glass moq should be 5
|
| - |
|
225 |
if(item.getCategoryId()==10020) {
|
| - |
|
226 |
fdi.setMinBuyQuantity(5);
|
| - |
|
227 |
} else {
|
| - |
|
228 |
fdi.setMinBuyQuantity(1);
|
| - |
|
229 |
}
|
| 219 |
fdi.setAvailability(10);
|
230 |
fdi.setAvailability(10);
|
| 220 |
fdi.setQuantityStep(1);
|
231 |
fdi.setQuantityStep(1);
|
| 221 |
fdi.setMinBuyQuantity(1);
|
- |
|
| 222 |
fdi.setMaxQuantity(Math.min(fdi.getAvailability(), 100));
|
232 |
fdi.setMaxQuantity(Math.min(fdi.getAvailability(), 100));
|
| 223 |
fofoAvailabilityInfoMap.put(itemId, fdi);
|
233 |
fofoAvailabilityInfoMap.put(itemId, fdi);
|
| 224 |
}
|
234 |
}
|
| 225 |
}
|
235 |
}
|
| 226 |
if(fofoAvailabilityInfoMap.values().size() > 0) {
|
236 |
if(fofoAvailabilityInfoMap.values().size() > 0) {
|