Subversion Repositories SmartDukaan

Rev

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

Rev 5446 Rev 5456
Line 211... Line 211...
211
	}
211
	}
212
	
212
	
213
	public void saveDiscounts(List<Discount> discounts) 
213
	public void saveDiscounts(List<Discount> discounts) 
214
		throws ShoppingCartException, TException{
214
		throws ShoppingCartException, TException{
215
		try {
215
		try {
216
			if(discounts == null||discounts.size()!=0) {
216
			if(discounts == null||discounts.size() == 0) {
217
			 	log.error("Discounts cannot be empty");
217
			 	log.error("Discounts cannot be empty");
218
				throw new ShoppingCartException(101, "discounts cannot be null");
218
				throw new ShoppingCartException(101, "discounts cannot be null");
219
			}
219
			}
220
			if(discounts.size()>0) {
220
			if(discounts.size()>0) {
221
				in.shop2020.user.domain.Cart cart = cartMapper.getCart(discounts.get(0).getCart_id());
221
				in.shop2020.user.domain.Cart cart = cartMapper.getCart(discounts.get(0).getCart_id());