Subversion Repositories SmartDukaan

Rev

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

Rev 4363 Rev 4603
Line 8... Line 8...
8
import in.shop2020.hotspot.dashbaord.shared.actions.AuthResponse;
8
import in.shop2020.hotspot.dashbaord.shared.actions.AuthResponse;
9
import in.shop2020.hotspot.dashbaord.shared.actions.AuthResponse.NEXT;
9
import in.shop2020.hotspot.dashbaord.shared.actions.AuthResponse.NEXT;
10
import in.shop2020.hotspot.dashbaord.shared.actions.BillingType;
10
import in.shop2020.hotspot.dashbaord.shared.actions.BillingType;
11
import in.shop2020.hotspot.dashbaord.shared.actions.UserType;
11
import in.shop2020.hotspot.dashbaord.shared.actions.UserType;
12
import in.shop2020.hotspot.dashbaord.server.CatalogUtils;
12
import in.shop2020.hotspot.dashbaord.server.CatalogUtils;
-
 
13
import in.shop2020.hotspot.dashbaord.server.LogisticsUtils;
13
import in.shop2020.model.v1.catalog.Warehouse;
14
import in.shop2020.model.v1.catalog.Warehouse;
14
import in.shop2020.thrift.clients.CatalogClient;
15
import in.shop2020.thrift.clients.CatalogClient;
15
import in.shop2020.thrift.clients.HelperClient;
16
import in.shop2020.thrift.clients.HelperClient;
16
import in.shop2020.utils.DashboardUser;
17
import in.shop2020.utils.DashboardUser;
17
import in.shop2020.utils.HelperService.Client;
18
import in.shop2020.utils.HelperService.Client;
Line 30... Line 31...
30
		boolean status = false;
31
		boolean status = false;
31
		long warehouseId = -1;
32
		long warehouseId = -1;
32
		UserType userType = UserType.WAREHOUSE_EXECUTIVE;
33
		UserType userType = UserType.WAREHOUSE_EXECUTIVE;
33
		BillingType billingType = BillingType.EXTERNAL;
34
		BillingType billingType = BillingType.EXTERNAL;
34
		Map<Long, String> vendors = null;
35
		Map<Long, String> vendors = null;
-
 
36
		Map<Long, String> providers = null;
35
		NEXT nextScreen = null;
37
		NEXT nextScreen = null;
36
		String message = null;
38
		String message = null;
37
		
39
		
38
		try {
40
		try {
39
            HelperClient hsc = new HelperClient();
41
            HelperClient hsc = new HelperClient();
Line 67... Line 69...
67
			    billingType = BillingType.EXTERNAL;
69
			    billingType = BillingType.EXTERNAL;
68
			}
70
			}
69
 
71
 
70
			vendors = CatalogUtils.getVendorsForWarehouse(warehouseId);
72
			vendors = CatalogUtils.getVendorsForWarehouse(warehouseId);
71
            
73
            
-
 
74
			providers = LogisticsUtils.getAllProviders();
-
 
75
			
72
			message = "You are charming, loving and affectionate";
76
			message = "You are charming, loving and affectionate";
73
		} catch (HelperServiceException e) {
77
		} catch (HelperServiceException e) {
74
			e.printStackTrace();
78
			e.printStackTrace();
75
		} catch (TException e) {
79
		} catch (TException e) {
76
			e.printStackTrace();
80
			e.printStackTrace();
77
		} catch (Exception e) {
81
		} catch (Exception e) {
78
			e.printStackTrace();
82
			e.printStackTrace();
79
		}
83
		}
80
		return new AuthResponse(userName, status, message, nextScreen, warehouseId, userType, billingType, vendors);
84
		return new AuthResponse(userName, status, message, nextScreen, warehouseId, userType, billingType, vendors, providers);
81
	}
85
	}
82
 
86
 
83
	@Override
87
	@Override
84
	public Class<AuthRequest> getActionType() {		
88
	public Class<AuthRequest> getActionType() {		
85
		return AuthRequest.class;
89
		return AuthRequest.class;