Subversion Repositories SmartDukaan

Rev

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

Rev 11747 Rev 11808
Line 198... Line 198...
198
			userinfo.setPincode(pincode);
198
			userinfo.setPincode(pincode);
199
			userinfo.setCartId(user.getActiveCartId());
199
			userinfo.setCartId(user.getActiveCartId());
200
			Cart cart = userClient.getCart(user.getActiveCartId());
200
			Cart cart = userClient.getCart(user.getActiveCartId());
201
			userinfo.setTotalItems(cart.getLinesSize());
201
			userinfo.setTotalItems(cart.getLinesSize());
202
			userinfo.setTotalAmount(cart.getTotalPrice());
202
			userinfo.setTotalAmount(cart.getTotalPrice());
203
			log.info(userinfo);
203
			userinfo.setPrivateDealUser(isPrivateDealUser());
204
			String src = user.getSource();
204
			String src = user.getSource();
205
			if (src == null) {
205
			if (src == null) {
206
			    src = "";
206
			    src = "";
207
			}
207
			}
208
			DataLogger.logData(EventType.LOGIN_SUCCESS, getSessionId(), userinfo.getUserId(),
208
			DataLogger.logData(EventType.LOGIN_SUCCESS, getSessionId(), userinfo.getUserId(),
Line 392... Line 392...
392
	
392
	
393
	public static void main(String[] args) {
393
	public static void main(String[] args) {
394
        DesEncrypter des = new DesEncrypter("saholic");
394
        DesEncrypter des = new DesEncrypter("saholic");
395
        System.out.println(des.decrypt("XvrWIvmYrUAdXqxhovZMSw"));
395
        System.out.println(des.decrypt("XvrWIvmYrUAdXqxhovZMSw"));
396
    }
396
    }
-
 
397
	
-
 
398
	private boolean isPrivateDealUser() throws TTransportException, TException{
-
 
399
		try {
-
 
400
			in.shop2020.model.v1.user.UserContextService.Client uc = new UserClient().getClient();
-
 
401
			return uc.isPrivateDealUser(userinfo.getUserId());
-
 
402
		} catch (TTransportException e) {
-
 
403
			log.error("Unable to get user service client.", e);	
-
 
404
		}
-
 
405
		return false;
-
 
406
	}
397
}
407
}