| Line 153... |
Line 153... |
| 153 |
|
153 |
|
| 154 |
@PostMapping(value = "/createAuthUser")
|
154 |
@PostMapping(value = "/createAuthUser")
|
| 155 |
public String createAuthUser(HttpServletRequest request,
|
155 |
public String createAuthUser(HttpServletRequest request,
|
| 156 |
@RequestParam(name = ProfitMandiConstants.FIRST_NAME, defaultValue = "") String firstName,
|
156 |
@RequestParam(name = ProfitMandiConstants.FIRST_NAME, defaultValue = "") String firstName,
|
| 157 |
@RequestParam(name = ProfitMandiConstants.LAST_NAME, defaultValue = "") String lastName,
|
157 |
@RequestParam(name = ProfitMandiConstants.LAST_NAME, defaultValue = "") String lastName,
|
| - |
|
158 |
@RequestParam(name = "extendedName", defaultValue = "") String extendedName,
|
| 158 |
@RequestParam(name = ProfitMandiConstants.EMAIL_ID, defaultValue = "") String emailId,
|
159 |
@RequestParam(name = ProfitMandiConstants.EMAIL_ID, defaultValue = "") String emailId,
|
| 159 |
@RequestParam(name = ProfitMandiConstants.MOBILE_NUMBER, defaultValue = "") String mobileNumber,
|
160 |
@RequestParam(name = ProfitMandiConstants.MOBILE_NUMBER, defaultValue = "") String mobileNumber,
|
| 160 |
@RequestParam(name = ProfitMandiConstants.GMAIL_ID, defaultValue = "") String gmailId,
|
161 |
@RequestParam(name = ProfitMandiConstants.GMAIL_ID, defaultValue = "") String gmailId,
|
| 161 |
@RequestParam(name = "employeeCode", defaultValue = "") String employeeCode,
|
162 |
@RequestParam(name = "employeeCode", defaultValue = "") String employeeCode,
|
| 162 |
@RequestParam(name = "imageUrl", defaultValue = "") String imageUrl,
|
163 |
@RequestParam(name = "imageUrl", defaultValue = "") String imageUrl,
|
| Line 202... |
Line 203... |
| 202 |
}
|
203 |
}
|
| 203 |
authUser = new AuthUser();
|
204 |
authUser = new AuthUser();
|
| 204 |
authUser.setEmailId(emailId);
|
205 |
authUser.setEmailId(emailId);
|
| 205 |
authUser.setFirstName(firstName);
|
206 |
authUser.setFirstName(firstName);
|
| 206 |
authUser.setLastName(lastName);
|
207 |
authUser.setLastName(lastName);
|
| - |
|
208 |
authUser.setExtendedName(extendedName.trim().isEmpty() ? null : extendedName.trim());
|
| 207 |
authUser.setMobileNumber(mobileNumber);
|
209 |
authUser.setMobileNumber(mobileNumber);
|
| 208 |
authUser.setGmailId(gmailId);
|
210 |
authUser.setGmailId(gmailId);
|
| 209 |
authUser.setImageUrl(imageUrl);
|
211 |
authUser.setImageUrl(imageUrl);
|
| 210 |
authUser.setEmployeeCode(employeeCode);
|
212 |
authUser.setEmployeeCode(employeeCode);
|
| 211 |
authUser.setActive(true);
|
213 |
authUser.setActive(true);
|
| Line 391... |
Line 393... |
| 391 |
user.setImageUrl(imageUrl);
|
393 |
user.setImageUrl(imageUrl);
|
| 392 |
model.addAttribute("response1", "true");
|
394 |
model.addAttribute("response1", "true");
|
| 393 |
return "response";
|
395 |
return "response";
|
| 394 |
}
|
396 |
}
|
| 395 |
|
397 |
|
| - |
|
398 |
@GetMapping(value = "/authuser/editExtendedName")
|
| - |
|
399 |
public String updateAuthUserExtendedName(Model model, @RequestParam(defaultValue = "") String extendedName,
|
| - |
|
400 |
@RequestParam String emailId) throws Exception {
|
| - |
|
401 |
AuthUser user = authRepository.selectByEmailOrMobile(emailId);
|
| - |
|
402 |
user.setExtendedName(extendedName.trim().isEmpty() ? null : extendedName.trim());
|
| - |
|
403 |
model.addAttribute("response1", "true");
|
| - |
|
404 |
return "response";
|
| - |
|
405 |
}
|
| - |
|
406 |
|
| 396 |
@PostMapping(value = "/authuser/remove")
|
407 |
@PostMapping(value = "/authuser/remove")
|
| 397 |
public String removeAuthUser(Model model, @RequestParam int id) throws Exception {
|
408 |
public String removeAuthUser(Model model, @RequestParam int id) throws Exception {
|
| 398 |
AuthUser user = authRepository.selectById(id);
|
409 |
AuthUser user = authRepository.selectById(id);
|
| 399 |
|
410 |
|
| 400 |
user.setActive(false);
|
411 |
user.setActive(false);
|