Subversion Repositories SmartDukaan

Rev

Rev 7408 | Rev 7524 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7408 Rev 7461
Line 50... Line 50...
50
	private String sellingPrice;
50
	private String sellingPrice;
51
	private String saholicPrice;
51
	private String saholicPrice;
52
	private String isTime;
52
	private String isTime;
53
	private String handlingTime;
53
	private String handlingTime;
54
	private String customHandlingTime;
54
	private String customHandlingTime;
-
 
55
	private String holdInventory;
-
 
56
	private String defaultInventory;
55
 
57
 
56
	public String index() {
58
	public String index() {
57
		return "index";
59
		return "index";
58
	}
60
	}
59
 
61
 
Line 85... Line 87...
85
			long delay = Long.valueOf(handlingTime);
87
			long delay = Long.valueOf(handlingTime);
86
			if ( Boolean.valueOf(isTime)) {
88
			if ( Boolean.valueOf(isTime)) {
87
				flag = true;
89
				flag = true;
88
				delay = Long.valueOf(customHandlingTime);
90
				delay = Long.valueOf(customHandlingTime);
89
			}
91
			}
90
 
-
 
-
 
92
			changeItemInventory();
91
			CatalogClient.updateAmazonItemDetails(Long.valueOf(itemId),Double.valueOf(fbaPrice),Double.valueOf(sellingPrice),Boolean.valueOf(isFba),Boolean.valueOf(isNonFba),Boolean.valueOf(isInventoryOverride),delay,flag);
93
			CatalogClient.updateAmazonItemDetails(Long.valueOf(itemId),Double.valueOf(fbaPrice),Double.valueOf(sellingPrice),Boolean.valueOf(isFba),Boolean.valueOf(isNonFba),Boolean.valueOf(isInventoryOverride),delay,flag);
92
		}
94
		}
93
		setUrl("/amazon-list/");
95
		setUrl("/amazon-list/");
94
		return "redirect";
96
		return "redirect";
95
 
97
 
96
	}
98
	}
97
 
99
 
-
 
100
	private void changeItemInventory() throws NumberFormatException, TException {
-
 
101
		Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
-
 
102
		if (StringUtils.isEmpty(holdInventory)) {
-
 
103
			holdInventory = "0";
-
 
104
		}
-
 
105
		if (StringUtils.isEmpty(defaultInventory)) {
-
 
106
			defaultInventory = "0";
-
 
107
		}
-
 
108
		
-
 
109
		CatalogClient.updateItemInventory(Long.valueOf(itemId),Long.valueOf(holdInventory),Long.valueOf(defaultInventory));
-
 
110
	}
-
 
111
 
-
 
112
 
98
	public Map<Long, Long> getAvailableItemInventory(String itemId) throws NumberFormatException, InventoryServiceException, TException{
113
	public Map<Long, Long> getAvailableItemInventory(String itemId) throws NumberFormatException, InventoryServiceException, TException{
99
		InventoryClient inventoryServiceClient = new InventoryClient();
114
		InventoryClient inventoryServiceClient = new InventoryClient();
100
		in.shop2020.model.v1.inventory.InventoryService.Client inventoryClient = inventoryServiceClient.getClient();
115
		in.shop2020.model.v1.inventory.InventoryService.Client inventoryClient = inventoryServiceClient.getClient();
101
		in.shop2020.model.v1.inventory.ItemInventory thriftItemInventory = inventoryClient.getItemInventoryByItemId(Long.valueOf(itemId));
116
		in.shop2020.model.v1.inventory.ItemInventory thriftItemInventory = inventoryClient.getItemInventoryByItemId(Long.valueOf(itemId));
102
		return thriftItemInventory.getAvailability();
117
		return thriftItemInventory.getAvailability();
Line 230... Line 245...
230
 
245
 
231
	public void setIsTime(String isTime){
246
	public void setIsTime(String isTime){
232
		this.isTime = isTime;
247
		this.isTime = isTime;
233
	}
248
	}
234
 
249
 
235
	String getIsTime(){
250
	public String getIsTime(){
236
		return isTime;
251
		return isTime;
237
	}
252
	}
238
 
253
 
239
	public void setHandlingTime(String handlingTime){
254
	public void setHandlingTime(String handlingTime){
240
		this.handlingTime = handlingTime;
255
		this.handlingTime = handlingTime;
241
	}
256
	}
242
 
257
 
243
	String getHandlingTime(){
258
	public String getHandlingTime(){
244
		return handlingTime;
259
		return handlingTime;
245
	}
260
	}
246
 
261
 
247
	public void setCustomHandlingTime(String customHandlingTime){
262
	public void setCustomHandlingTime(String customHandlingTime){
248
		this.customHandlingTime = customHandlingTime;
263
		this.customHandlingTime = customHandlingTime;
249
	}
264
	}
250
 
265
 
251
	String getCustomHandlingTime(){
266
	public String getCustomHandlingTime(){
252
		return customHandlingTime;
267
		return customHandlingTime;
253
	}
268
	}
-
 
269
	
-
 
270
	public void setHoldInventory(String holdInventory){
-
 
271
		this.holdInventory = holdInventory;
-
 
272
	}
-
 
273
 
-
 
274
	public String getHoldInventory(){
-
 
275
		return holdInventory;
-
 
276
	}
-
 
277
	
-
 
278
	public void setDefaultInventory(String defaultInventory){
-
 
279
		this.defaultInventory = defaultInventory;
-
 
280
	}
-
 
281
 
-
 
282
	public String getDefaultInventory(){
-
 
283
		return defaultInventory;
-
 
284
	}
254
 
285
 
255
	@Override
286
	@Override
256
	public void setServletRequest(HttpServletRequest request) {
287
	public void setServletRequest(HttpServletRequest request) {
257
		this.request = request;
288
		this.request = request;
258
 
289