Subversion Repositories SmartDukaan

Rev

Rev 25243 | Rev 25303 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
21561 ashik.ali 1
package com.spice.profitmandi.web.controller;
21555 kshitij.so 2
 
25008 amit.gupta 3
import java.lang.reflect.Type;
23419 ashik.ali 4
import java.time.LocalDateTime;
22139 amit.gupta 5
import java.util.ArrayList;
25008 amit.gupta 6
import java.util.HashMap;
22111 ashik.ali 7
import java.util.HashSet;
8
import java.util.List;
25008 amit.gupta 9
import java.util.Map;
22111 ashik.ali 10
import java.util.Set;
24976 amit.gupta 11
import java.util.stream.Collectors;
22069 ashik.ali 12
 
21577 ashik.ali 13
import javax.servlet.http.Cookie;
21561 ashik.ali 14
import javax.servlet.http.HttpServletRequest;
21577 ashik.ali 15
import javax.servlet.http.HttpServletResponse;
21561 ashik.ali 16
 
25009 amit.gupta 17
import org.apache.http.NameValuePair;
18
import org.apache.http.client.utils.URLEncodedUtils;
19
import org.apache.http.message.BasicNameValuePair;
23784 ashik.ali 20
import org.apache.logging.log4j.LogManager;
23568 govind 21
import org.apache.logging.log4j.Logger;
21561 ashik.ali 22
import org.springframework.beans.factory.annotation.Autowired;
22079 amit.gupta 23
import org.springframework.beans.factory.annotation.Value;
21555 kshitij.so 24
import org.springframework.stereotype.Controller;
21987 kshitij.so 25
import org.springframework.transaction.annotation.Transactional;
21615 kshitij.so 26
import org.springframework.ui.Model;
21555 kshitij.so 27
import org.springframework.ui.ModelMap;
28
import org.springframework.web.bind.annotation.ModelAttribute;
24383 amit.gupta 29
import org.springframework.web.bind.annotation.PostMapping;
24016 amit.gupta 30
import org.springframework.web.bind.annotation.RequestBody;
21555 kshitij.so 31
import org.springframework.web.bind.annotation.RequestMapping;
32
import org.springframework.web.bind.annotation.RequestMethod;
21561 ashik.ali 33
import org.springframework.web.bind.annotation.RequestParam;
21555 kshitij.so 34
 
25008 amit.gupta 35
import com.google.gson.Gson;
36
import com.google.gson.reflect.TypeToken;
21561 ashik.ali 37
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
24016 amit.gupta 38
import com.spice.profitmandi.common.model.Location;
21561 ashik.ali 39
import com.spice.profitmandi.common.model.ProfitMandiConstants;
25011 amit.gupta 40
import com.spice.profitmandi.common.model.ProfitMandiResponse;
25008 amit.gupta 41
import com.spice.profitmandi.common.web.client.RestClient;
24383 amit.gupta 42
import com.spice.profitmandi.dao.entity.auth.AuthUser;
22111 ashik.ali 43
import com.spice.profitmandi.dao.entity.dtr.Retailer;
23784 ashik.ali 44
import com.spice.profitmandi.dao.entity.dtr.Role;
22111 ashik.ali 45
import com.spice.profitmandi.dao.entity.dtr.User;
23271 ashik.ali 46
import com.spice.profitmandi.dao.entity.dtr.UserAccount;
22111 ashik.ali 47
import com.spice.profitmandi.dao.entity.dtr.UserRole;
24016 amit.gupta 48
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
22111 ashik.ali 49
import com.spice.profitmandi.dao.enumuration.dtr.AccountType;
50
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
24383 amit.gupta 51
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
24016 amit.gupta 52
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
22111 ashik.ali 53
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
23784 ashik.ali 54
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
22111 ashik.ali 55
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
56
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
57
import com.spice.profitmandi.dao.repository.dtr.UserRoleRepository;
24383 amit.gupta 58
import com.spice.profitmandi.service.AuthService;
24976 amit.gupta 59
import com.spice.profitmandi.service.authentication.RoleManager;
60
import com.spice.profitmandi.service.user.RetailerService;
22139 amit.gupta 61
import com.spice.profitmandi.web.model.LoginDetails;
22069 ashik.ali 62
import com.spice.profitmandi.web.util.CookiesProcessor;
22111 ashik.ali 63
import com.spice.profitmandi.web.util.GoogleTokenUtil;
21574 ashik.ali 64
import com.spice.profitmandi.web.util.MVCResponseSender;
21561 ashik.ali 65
 
21555 kshitij.so 66
@Controller
22148 amit.gupta 67
@Transactional
21555 kshitij.so 68
public class LoginController {
69
 
23568 govind 70
	private static final Logger LOGGER = LogManager.getLogger(LoginController.class);
24016 amit.gupta 71
 
21561 ashik.ali 72
	@Autowired
22927 ashik.ali 73
	private GoogleTokenUtil googleTokenUtil;
24016 amit.gupta 74
 
21574 ashik.ali 75
	@Autowired
24976 amit.gupta 76
	private RoleManager roleManager;
24984 amit.gupta 77
 
24976 amit.gupta 78
	@Autowired
22927 ashik.ali 79
	private RetailerRepository retailerRepository;
24016 amit.gupta 80
 
22111 ashik.ali 81
	@Autowired
24976 amit.gupta 82
	private RetailerService retailerService;
24984 amit.gupta 83
 
24976 amit.gupta 84
	@Autowired
22927 ashik.ali 85
	private UserRepository userRepository;
24016 amit.gupta 86
 
22111 ashik.ali 87
	@Autowired
22927 ashik.ali 88
	private UserAccountRepository userAccountRepository;
24016 amit.gupta 89
 
22111 ashik.ali 90
	@Autowired
22927 ashik.ali 91
	private UserRoleRepository userRoleRepository;
24016 amit.gupta 92
 
22111 ashik.ali 93
	@Autowired
23784 ashik.ali 94
	private RoleRepository roleRepository;
24016 amit.gupta 95
 
23784 ashik.ali 96
	@Autowired
24016 amit.gupta 97
	private FofoStoreRepository fofoStoreRepository;
98
 
99
	@Autowired
22927 ashik.ali 100
	private MVCResponseSender mvcResponseSender;
25243 amit.gupta 101
 
25008 amit.gupta 102
	@Autowired
103
	private RestClient restClient;
24016 amit.gupta 104
 
21578 ashik.ali 105
	@Autowired
22927 ashik.ali 106
	private CookiesProcessor cookiesProcessor;
22079 amit.gupta 107
 
108
	@Value("${google.api.key}")
109
	private String googleApiKey;
24016 amit.gupta 110
 
24383 amit.gupta 111
	@Autowired
112
	private AuthService authService;
113
 
114
	@Autowired
115
	private AuthRepository authRepository;
116
 
21555 kshitij.so 117
	@RequestMapping(value = "/login", method = RequestMethod.GET)
24016 amit.gupta 118
	public String loginPage(HttpServletRequest request, Model model) throws Exception {
22088 amit.gupta 119
		LOGGER.info("Context Path is {}", request.getContextPath());
24016 amit.gupta 120
		try {
23784 ashik.ali 121
			LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
22139 amit.gupta 122
			LOGGER.info("Request session is already exist, should be redirect to as per roles assigned");
23784 ashik.ali 123
			String redirectUrl = null;
24016 amit.gupta 124
 
23784 ashik.ali 125
			Role roleRetailer = roleRepository.selectByName(RoleType.RETAILER.toString());
126
			Role roleFofo = roleRepository.selectByName(RoleType.RETAILER.toString());
127
			Role roleFofoAdmin = roleRepository.selectByName(RoleType.RETAILER.toString());
24016 amit.gupta 128
			if ((fofoDetails.getRoleIds().contains(roleRetailer.getId())
129
					&& fofoDetails.getRoleIds().contains(roleFofo.getId())
130
					|| (fofoDetails.getRoleIds().contains(roleFofoAdmin.getId())))) {
23784 ashik.ali 131
				redirectUrl = "/dashboard";
132
			} else {
133
				redirectUrl = "/login";
134
			}
135
			return "redirect:" + redirectUrl;
24016 amit.gupta 136
		} catch (ProfitMandiBusinessException profitMandiBusinessException) {
22079 amit.gupta 137
			model.addAttribute("googleApiKey", googleApiKey);
22086 amit.gupta 138
			model.addAttribute("appContextPath", request.getContextPath());
21577 ashik.ali 139
			return "login";
21574 ashik.ali 140
		}
21555 kshitij.so 141
	}
24016 amit.gupta 142
 
22155 amit.gupta 143
	@RequestMapping(value = "/", method = RequestMethod.GET)
24016 amit.gupta 144
	public String home() {
22860 ashik.ali 145
		return "redirect:/login";
22155 amit.gupta 146
	}
25243 amit.gupta 147
 
25008 amit.gupta 148
	@RequestMapping(value = "/mobileapp", method = RequestMethod.GET)
25275 amit.gupta 149
	public String mobileApp(HttpServletRequest request, Model model, @RequestParam(defaultValue = "") String emailId)
150
			throws Exception {
25008 amit.gupta 151
		LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
25243 amit.gupta 152
		if (roleManager.isAdmin(fofoDetails.getRoleIds())) {
25275 amit.gupta 153
			if (emailId.equals("")) {
154
				model.addAttribute("authToken", getToken(fofoDetails.getEmailId()));
155
			} else {
156
				model.addAttribute("authToken", getToken(emailId));
157
			}
25008 amit.gupta 158
		}
159
		return "mobileapp";
160
	}
24016 amit.gupta 161
 
25008 amit.gupta 162
	private String getToken(String emailId) throws Exception {
25009 amit.gupta 163
		List<NameValuePair> nameValuePairs = new ArrayList<>();
164
		nameValuePairs.add(new BasicNameValuePair("adminToken", "ecip$stgMay2014"));
25011 amit.gupta 165
		nameValuePairs.add(new BasicNameValuePair("emailId", emailId));
25243 amit.gupta 166
		String queryString = URLEncodedUtils.format(nameValuePairs, "UTF-8");
167
		String response = restClient.post("http://app.profitmandi.com:8080/profitmandi-web/user/admin?" + queryString,
168
				new HashMap<>(), new HashMap<>());
169
		Type t = new TypeToken<ProfitMandiResponse<Map<String, Object>>>() {
170
		}.getType();
171
		ProfitMandiResponse<Map<String, Object>> apiResponse = new Gson().fromJson(response, t);
172
		if (apiResponse.getStatusCode().equals("200")) {
173
			return (new StringBuilder((String) apiResponse.getResponse().get("token")).reverse().toString());
25008 amit.gupta 174
		} else {
25009 amit.gupta 175
			throw new Exception("Unauthorised access");
25008 amit.gupta 176
		}
25243 amit.gupta 177
 
25008 amit.gupta 178
	}
25243 amit.gupta 179
 
24976 amit.gupta 180
	@RequestMapping(value = "/login-as-partner", method = RequestMethod.GET)
181
	public String adminLogin(HttpServletRequest request, Model model, HttpServletResponse response,
182
			@RequestParam int fofoId) throws Exception {
183
		LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
24984 amit.gupta 184
		if (roleManager.isAdmin(fofoDetails.getRoleIds())) {
185
			int userId = userAccountRepository.selectUserIdByRetailerId(fofoId);
186
			User user = userRepository.selectById(userId);
25243 amit.gupta 187
			Set<Integer> roleIds = userRoleRepository.selectByUserId(userId).stream().map(x -> x.getRoleId())
188
					.collect(Collectors.toSet());
24976 amit.gupta 189
			LoginDetails newFofoDetails = new LoginDetails();
190
			newFofoDetails.setFofoId(fofoId);
191
			newFofoDetails.setRoleIds(roleIds);
24984 amit.gupta 192
			newFofoDetails.setEmailId(user.getEmailId());
24981 amit.gupta 193
			model.addAttribute("response", true);
24983 amit.gupta 194
			this.addCookiesToResponse(newFofoDetails, request, response);
24976 amit.gupta 195
		} else {
196
			throw new ProfitMandiBusinessException("", "", "");
197
		}
24981 amit.gupta 198
		return "response";
24976 amit.gupta 199
	}
200
 
21555 kshitij.so 201
	@RequestMapping(value = "/login", method = RequestMethod.POST)
24016 amit.gupta 202
	public String login(HttpServletRequest request, HttpServletResponse response,
24383 amit.gupta 203
			@RequestParam(name = ProfitMandiConstants.TOKEN) String token,
204
			@RequestParam(name = ProfitMandiConstants.EMAIL_ID_OR_MOBILE_NUMBER, defaultValue = "") String emailIdOrMobileNumber,
205
			@RequestParam(name = "password", defaultValue = "") String password, Model model) throws Exception {
206
 
22139 amit.gupta 207
		LoginDetails fofoDetails = new LoginDetails();
23784 ashik.ali 208
		Set<Integer> roleIds = new HashSet<>();
209
		fofoDetails.setRoleIds(roleIds);
24383 amit.gupta 210
		String emailId = null;
24976 amit.gupta 211
		String name = null;
24016 amit.gupta 212
		try {
213
			// if role is retailer then FOFO_ID is retailerId else it is userid as normal
214
			// user's wont have retailer id.
24383 amit.gupta 215
			if (token == "") {
216
				if (authService.authenticate(emailIdOrMobileNumber, password)) {
217
					AuthUser authUser = authRepository.selectByEmailOrMobile(emailIdOrMobileNumber);
24976 amit.gupta 218
					if (authUser == null) {
219
						throw new ProfitMandiBusinessException("Authentication", "Email or Mobile",
220
								"Invalid Email Or Mobile");
24383 amit.gupta 221
					}
222
					emailId = authUser.getEmailId();
24976 amit.gupta 223
					name = authUser.getFirstName() + " " + authUser.getLastName();
24383 amit.gupta 224
					authUser.setLastLoginTimestamp(LocalDateTime.now());
225
					authRepository.persist(authUser);
226
				}
227
 
228
			} else {
25243 amit.gupta 229
				try {
230
					emailId = googleTokenUtil.getEmailId(token);
25275 amit.gupta 231
				} catch (Exception e) {
232
					// in case we cannot connect to google server.
25243 amit.gupta 233
					emailId = emailIdOrMobileNumber;
234
				}
24976 amit.gupta 235
				if (ProfitMandiConstants.BLOCKED_EMAILS.contains(emailId)) {
24527 amit.gupta 236
				}
24383 amit.gupta 237
			}
22139 amit.gupta 238
			fofoDetails.setEmailId(emailId);
239
			fofoDetails.setFofoId(-1);
24016 amit.gupta 240
			// fofoDetails.setFofo(false);
22111 ashik.ali 241
			User user = null;
24016 amit.gupta 242
			try {
22111 ashik.ali 243
				user = userRepository.selectByEmailId(emailId);
24016 amit.gupta 244
			} catch (ProfitMandiBusinessException profitMandiBusinessException) {
23628 ashik.ali 245
				LOGGER.error("User not found with given emailId [{}]", emailId);
23203 ashik.ali 246
			}
24016 amit.gupta 247
			if (user == null) {
248
				try {
23203 ashik.ali 249
					user = userRepository.selectBySecondryEmailId(emailId);
24016 amit.gupta 250
				} catch (ProfitMandiBusinessException profitMandiBusinessException) {
23203 ashik.ali 251
					LOGGER.error("User not found with given emailId", profitMandiBusinessException);
24527 amit.gupta 252
					model.addAttribute("response", mvcResponseSender.createResponseString("RTLR_OK_1002", true,
24976 amit.gupta 253
							request.getContextPath() + "/login", "Email"));
24527 amit.gupta 254
					return "response";
23203 ashik.ali 255
				}
256
			}
24016 amit.gupta 257
			if (user != null) {
22139 amit.gupta 258
				fofoDetails.setFofoId(user.getId());
259
				try {
260
					List<UserRole> userRoles = userRoleRepository.selectByUserId(user.getId());
24016 amit.gupta 261
					for (int index = 0; index < userRoles.size(); index++) {
23784 ashik.ali 262
						roleIds.add(userRoles.get(index).getRoleId());
22139 amit.gupta 263
					}
23784 ashik.ali 264
					List<Role> roles = roleRepository.selectByIds(roleIds);
24016 amit.gupta 265
					for (Role role : roles) {
266
						if (role.getName().equals(RoleType.RETAILER.toString())) {
267
							UserAccount userAccounts = userAccountRepository.selectByUserIdType(user.getId(),
268
									AccountType.saholic);
23784 ashik.ali 269
							Retailer retailer = retailerRepository.selectById(userAccounts.getAccountKey());
270
							fofoDetails.setFofoId(retailer.getId());
24016 amit.gupta 271
							// fofoDetails.setFofo(retailer.isFofo());
23784 ashik.ali 272
						}
22166 amit.gupta 273
					}
24016 amit.gupta 274
				} catch (ProfitMandiBusinessException pmbe) {
22139 amit.gupta 275
					LOGGER.error("Data Inconsistent", pmbe);
276
				}
22111 ashik.ali 277
			}
23784 ashik.ali 278
			String redirectUrl = null;
24016 amit.gupta 279
 
25243 amit.gupta 280
			Role roleFofo = roleRepository.selectByName(RoleType.FOFO.toString());
281
			Role roleFofoAdmin = roleRepository.selectByName(RoleType.FOFO_ADMIN.toString());
24016 amit.gupta 282
 
25243 amit.gupta 283
			if (fofoDetails.getRoleIds().contains(roleFofo.getId())) {
23784 ashik.ali 284
				redirectUrl = "/dashboard";
25275 amit.gupta 285
				if (fofoDetails.getRoleIds().contains(roleFofo.getId())) {
286
 
25243 amit.gupta 287
				}
23784 ashik.ali 288
			} else {
289
				redirectUrl = "/login";
290
			}
24016 amit.gupta 291
 
25243 amit.gupta 292
			if (redirectUrl.equals("/dashboard")) {
23419 ashik.ali 293
				user.setLoginTimestamp(LocalDateTime.now());
23173 ashik.ali 294
				this.addCookiesToResponse(fofoDetails, request, response);
24016 amit.gupta 295
				LOGGER.info("Requested token email_id is valid, user login to system, shoud be redirect to {}",
296
						redirectUrl);
297
				model.addAttribute("response", mvcResponseSender.createResponseString("RTLR_OK_1002", true,
24976 amit.gupta 298
						request.getContextPath() + redirectUrl, name));
24016 amit.gupta 299
			} else {
23173 ashik.ali 300
				LOGGER.error("Requested token email_id is not valid, please try to login");
25243 amit.gupta 301
				/**
25275 amit.gupta 302
				 * TODO:Amit This redirect should be handle.
25243 amit.gupta 303
				 */
24016 amit.gupta 304
				throw new ProfitMandiBusinessException(ProfitMandiConstants.EMAIL_ID, fofoDetails.getEmailId(),
305
						"RTLR_1000");
23173 ashik.ali 306
			}
21578 ashik.ali 307
			return "response";
24016 amit.gupta 308
		} catch (ProfitMandiBusinessException profitMandiBusinessException) {
21568 ashik.ali 309
			LOGGER.error("Error : ", profitMandiBusinessException);
24016 amit.gupta 310
			model.addAttribute("response",
311
					mvcResponseSender.createResponseString(profitMandiBusinessException.getCode(), false, "/error"));
21578 ashik.ali 312
			return "response";
21561 ashik.ali 313
		}
21555 kshitij.so 314
	}
24976 amit.gupta 315
 
24383 amit.gupta 316
	@PostMapping(value = "/forgetPassword")
24976 amit.gupta 317
	public String forgetPasswordPage(
318
			@RequestParam(name = ProfitMandiConstants.EMAIL_ID, defaultValue = "") String emailId, Model model)
319
			throws Exception {
24383 amit.gupta 320
		LOGGER.info(emailId);
321
		authService.resetPassword(emailId);
322
		model.addAttribute("response", mvcResponseSender.createResponseString(true));
323
		LOGGER.info("completed");
324
		return "response";
325
	}
24016 amit.gupta 326
 
327
	private void addCookiesToResponse(LoginDetails fofoDetails, HttpServletRequest request,
328
			HttpServletResponse response) {
23784 ashik.ali 329
		List<String> roleIds = new ArrayList<>();
24016 amit.gupta 330
 
331
		for (int roleId : fofoDetails.getRoleIds()) {
23784 ashik.ali 332
			roleIds.add(String.valueOf(roleId));
22139 amit.gupta 333
		}
23784 ashik.ali 334
		Cookie cookieRoleIds = new Cookie(ProfitMandiConstants.ROLE_IDS, String.join(",", roleIds));
335
		cookieRoleIds.setDomain(request.getServerName());
336
		cookieRoleIds.setPath(request.getContextPath());
24016 amit.gupta 337
 
22139 amit.gupta 338
		Cookie cookieFofoId = new Cookie(ProfitMandiConstants.FOFO_ID, String.valueOf(fofoDetails.getFofoId()));
339
		cookieFofoId.setDomain(request.getServerName());
22160 amit.gupta 340
		cookieFofoId.setPath(request.getContextPath());
24016 amit.gupta 341
 
22139 amit.gupta 342
		Cookie cookieEmailId = new Cookie(ProfitMandiConstants.EMAIL_ID, fofoDetails.getEmailId());
343
		cookieEmailId.setDomain(request.getServerName());
22160 amit.gupta 344
		cookieEmailId.setPath(request.getContextPath());
24984 amit.gupta 345
 
22139 amit.gupta 346
		response.addCookie(cookieFofoId);
347
		response.addCookie(cookieEmailId);
23784 ashik.ali 348
		response.addCookie(cookieRoleIds);
22139 amit.gupta 349
	}
24016 amit.gupta 350
 
22069 ashik.ali 351
	@RequestMapping(value = "/logout", method = RequestMethod.GET)
24016 amit.gupta 352
	public String logout(HttpServletRequest request, @ModelAttribute("model") ModelMap model,
353
			HttpServletResponse response) throws Exception {
354
		try {
23419 ashik.ali 355
			LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
356
			User user = null;
24016 amit.gupta 357
			try {
23419 ashik.ali 358
				user = userRepository.selectByEmailId(loginDetails.getEmailId());
24016 amit.gupta 359
			} catch (ProfitMandiBusinessException profitMandiBusinessException) {
23419 ashik.ali 360
				LOGGER.error("User not found with given emailId", profitMandiBusinessException);
361
			}
24016 amit.gupta 362
			if (user == null) {
23419 ashik.ali 363
				user = userRepository.selectBySecondryEmailId(loginDetails.getEmailId());
364
			}
365
			user.setLogoutTimestamp(LocalDateTime.now());
366
			userRepository.persist(user);
22069 ashik.ali 367
			cookiesProcessor.removeCookies(request, response);
368
			LOGGER.info("Logout is successfull, should be redirect to /login");
22085 amit.gupta 369
			return "redirect:/login";
24016 amit.gupta 370
		} catch (ProfitMandiBusinessException profitMandiBusinessException) {
22069 ashik.ali 371
			LOGGER.info("Error occured while removing requested cookies, should be redirect to /login");
22085 amit.gupta 372
			return "redirect:/login";
22069 ashik.ali 373
		}
374
	}
24016 amit.gupta 375
 
376
	@RequestMapping(value = "/partner/location", method = RequestMethod.PUT)
377
	public String setLocation(HttpServletRequest request, Model model, @RequestBody Location location)
378
			throws Exception {
379
		LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
380
		boolean response = true;
24976 amit.gupta 381
		try {
382
			FofoStore fs = fofoStoreRepository.selectByRetailerId(loginDetails.getFofoId());
383
			if (fs.getLatitude() == null) {
384
				fs.setLatitude(location.getLatitude());
385
				fs.setLongitude(location.getLongitude());
386
				fofoStoreRepository.persist(fs);
387
			}
388
			model.addAttribute("response", response);
389
		} catch (Exception e) {
24383 amit.gupta 390
			LOGGER.error("FofoStore Code not found of fofoId {}", loginDetails.getFofoId());
391
		}
24016 amit.gupta 392
		return "response";
393
	}
21555 kshitij.so 394
}