| Line 84... |
Line 84... |
| 84 |
@RequestParam(name = ProfitMandiConstants.FIRST_NAME, defaultValue = "") String firstName,
|
84 |
@RequestParam(name = ProfitMandiConstants.FIRST_NAME, defaultValue = "") String firstName,
|
| 85 |
@RequestParam(name = ProfitMandiConstants.LAST_NAME, defaultValue = "") String lastName,
|
85 |
@RequestParam(name = ProfitMandiConstants.LAST_NAME, defaultValue = "") String lastName,
|
| 86 |
@RequestParam(name = ProfitMandiConstants.EMAIL_ID, defaultValue = "") String emailId,
|
86 |
@RequestParam(name = ProfitMandiConstants.EMAIL_ID, defaultValue = "") String emailId,
|
| 87 |
@RequestParam(name = ProfitMandiConstants.MOBILE_NUMBER, defaultValue = "") String mobileNumber,
|
87 |
@RequestParam(name = ProfitMandiConstants.MOBILE_NUMBER, defaultValue = "") String mobileNumber,
|
| 88 |
@RequestParam(name = ProfitMandiConstants.GMAIL_ID, defaultValue = "") String gmailId,
|
88 |
@RequestParam(name = ProfitMandiConstants.GMAIL_ID, defaultValue = "") String gmailId,
|
| - |
|
89 |
@RequestParam(name = "employeeCode", defaultValue = "") String employeeCode,
|
| 89 |
@RequestParam(name = "offset", defaultValue = "0") int offset,
|
90 |
@RequestParam(name = "offset", defaultValue = "0") int offset,
|
| 90 |
@RequestParam(name = "limit", defaultValue = "10") int limit, Model model)
|
91 |
@RequestParam(name = "limit", defaultValue = "10") int limit, Model model)
|
| 91 |
throws ProfitMandiBusinessException {
|
92 |
throws ProfitMandiBusinessException {
|
| 92 |
AuthUser authUser = null;
|
93 |
AuthUser authUser = null;
|
| 93 |
User user = null;
|
94 |
User user = null;
|
| Line 130... |
Line 131... |
| 130 |
authUser.setEmailId(emailId);
|
131 |
authUser.setEmailId(emailId);
|
| 131 |
authUser.setFirstName(firstName);
|
132 |
authUser.setFirstName(firstName);
|
| 132 |
authUser.setLastName(lastName);
|
133 |
authUser.setLastName(lastName);
|
| 133 |
authUser.setMobileNumber(mobileNumber);
|
134 |
authUser.setMobileNumber(mobileNumber);
|
| 134 |
authUser.setGmailId(gmailId);
|
135 |
authUser.setGmailId(gmailId);
|
| - |
|
136 |
authUser.setEmployeeCode(employeeCode);
|
| 135 |
authUser.setActive(true);
|
137 |
authUser.setActive(true);
|
| 136 |
|
138 |
|
| 137 |
authUser.setCreatedTimestamp(LocalDateTime.now());
|
139 |
authUser.setCreatedTimestamp(LocalDateTime.now());
|
| 138 |
authService.addAuthUser(authUser);
|
140 |
authService.addAuthUser(authUser);
|
| 139 |
|
141 |
|
| Line 183... |
Line 185... |
| 183 |
user.setGmailId(gmailId);
|
185 |
user.setGmailId(gmailId);
|
| 184 |
authRepository.persist(user);
|
186 |
authRepository.persist(user);
|
| 185 |
model.addAttribute("response", "true");
|
187 |
model.addAttribute("response", "true");
|
| 186 |
return "response";
|
188 |
return "response";
|
| 187 |
}
|
189 |
}
|
| 188 |
|
190 |
|
| 189 |
@PostMapping(value = "/authuser/remove")
|
191 |
@PostMapping(value = "/authuser/remove")
|
| 190 |
public String removeAuthUser(Model model, @RequestParam int id)
|
192 |
public String removeAuthUser(Model model, @RequestParam int id) throws Exception {
|
| 191 |
throws Exception {
|
- |
|
| 192 |
AuthUser user = authRepository.selectById(id);
|
193 |
AuthUser user = authRepository.selectById(id);
|
| 193 |
user.setActive(false);
|
194 |
user.setActive(false);
|
| 194 |
authRepository.persist(user);
|
195 |
authRepository.persist(user);
|
| 195 |
model.addAttribute("response", "true");
|
196 |
model.addAttribute("response", "true");
|
| 196 |
return "response";
|
197 |
return "response";
|