Subversion Repositories SmartDukaan

Rev

Rev 5464 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5464 Rev 5560
Line 764... Line 764...
764
		} catch(Exception e) {
764
		} catch(Exception e) {
765
			log.error(e);
765
			log.error(e);
766
			throw new TException(e.getMessage(), e);
766
			throw new TException(e.getMessage(), e);
767
		}
767
		}
768
	}
768
	}
-
 
769
 
-
 
770
 
-
 
771
	void addStoreToCart(long cartId, long storeId) throws TException{
-
 
772
		try {
-
 
773
			in.shop2020.user.domain.Cart cart = cartMapper.getCart(cartId);
-
 
774
			if(cart == null) {
-
 
775
				log.error("No cart found for Id : "+cartId);
-
 
776
				throw new ShoppingCartException(101, "No cart found for Id : "+cartId);
-
 
777
			}
-
 
778
			
-
 
779
			if(storeId != 0){
-
 
780
				cart.setPickupStoreId(storeId);
-
 
781
			}else{
-
 
782
				cart.setPickupStoreId(0);
-
 
783
			}
-
 
784
			cartMapper.updateCart(cart);
-
 
785
		} catch(Exception e) {
-
 
786
			log.error(e);
-
 
787
			throw new TException(e.getMessage(), e);
-
 
788
		}
-
 
789
 
-
 
790
	}
769
}
791
}