Subversion Repositories SmartDukaan

Rev

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

Rev 22355 Rev 22370
Line 159... Line 159...
159
		}
159
		}
160
		if (user != null) {
160
		if (user != null) {
161
			responseMap.put(ProfitMandiConstants.EMAIL_ID, user.getEmailId());
161
			responseMap.put(ProfitMandiConstants.EMAIL_ID, user.getEmailId());
162
			responseMap.put(ProfitMandiConstants.USER_ID, user.getId());
162
			responseMap.put(ProfitMandiConstants.USER_ID, user.getId());
163
			responseMap.put(ProfitMandiConstants.USER_NAME, user.getFirstName() + " " + user.getLastName());
163
			responseMap.put(ProfitMandiConstants.USER_NAME, user.getFirstName() + " " + user.getLastName());
164
			int retailerId = userAccountRepository.selectRetailerIdByUserId(user.getId());
-
 
165
			com.spice.profitmandi.dao.entity.user.User saholicUser = userUserRepository.selectById(retailerId);
-
 
166
			if(saholicUser.getAddressId() != null){
-
 
167
				Address address = addressRepository.selectById(saholicUser.getAddressId());
-
 
168
				responseMap.put(ProfitMandiConstants.ADDRESS, address);
-
 
169
			}
-
 
170
			List<UserRole> userRoles = userRoleRepository.selectByUserId(user.getId());
164
			List<UserRole> userRoles = userRoleRepository.selectByUserId(user.getId());
171
			LOGGER.info("userRoles {} ", userRoles);
165
			LOGGER.info("userRoles {} ", userRoles);
172
			String[] roleTypes = new String[userRoles.size()];
166
			String[] roleTypes = new String[userRoles.size()];
173
 
167
 
174
			// generate new token if roles have been updated
168
			// generate new token if roles have been updated
Line 190... Line 184...
190
				}
184
				}
191
			})) {
185
			})) {
192
				
186
				
193
				UserCart uc = userAccountRepository.getUserCart(userInfo.getUserId());
187
				UserCart uc = userAccountRepository.getUserCart(userInfo.getUserId());
194
				Retailer retailer = retailerRepository.selectById(uc.getUserId());
188
				Retailer retailer = retailerRepository.selectById(uc.getUserId());
-
 
189
				com.spice.profitmandi.dao.entity.user.User saholicUser = userUserRepository.selectById(uc.getUserId());
-
 
190
				if(saholicUser.getAddressId() != null){
-
 
191
					Address address = addressRepository.selectById(saholicUser.getAddressId());
-
 
192
					responseMap.put(ProfitMandiConstants.ADDRESS, address);
-
 
193
				}
195
				// if retailer is activated 1 then verified retailer
194
				// if retailer is activated 1 then verified retailer
196
				// else if migrated is 1 then old retailer
195
				// else if migrated is 1 then old retailer
197
				// else retailer is not verifed
196
				// else retailer is not verifed
198
				if (retailer.isActive()) {
197
				if (retailer.isActive()) {
199
					if (retailer.isFofo()) {
198
					if (retailer.isFofo()) {