| Line 420... |
Line 420... |
| 420 |
}
|
420 |
}
|
| 421 |
return saholicUser.getId();
|
421 |
return saholicUser.getId();
|
| 422 |
}
|
422 |
}
|
| 423 |
|
423 |
|
| 424 |
private com.spice.profitmandi.dao.entity.user.User createSaholicUser(
|
424 |
private com.spice.profitmandi.dao.entity.user.User createSaholicUser(
|
| 425 |
LoginRequestResponseModel loginRequestResponseModel) {
|
425 |
LoginRequestResponseModel loginRequestResponseModel) {
|
| 426 |
com.spice.profitmandi.dao.entity.user.User saholicUser = null;
|
426 |
com.spice.profitmandi.dao.entity.user.User saholicUser = null;
|
| 427 |
try {
|
427 |
try {
|
| 428 |
saholicUser = userUserRepository.selectByEmailId(loginRequestResponseModel.getEmail());
|
428 |
saholicUser = userUserRepository.selectByEmailId(loginRequestResponseModel.getEmail());
|
| 429 |
saholicUser.setCreateTimestamp(LocalDateTime.now());
|
429 |
saholicUser.setCreateTimestamp(LocalDateTime.now());
|
| 430 |
} catch (ProfitMandiBusinessException e) {
|
430 |
} catch (ProfitMandiBusinessException e) {
|
| Line 744... |
Line 744... |
| 744 |
Set<Integer> roleIds = new HashSet<>();
|
744 |
Set<Integer> roleIds = new HashSet<>();
|
| 745 |
for (UserRole userRole : userRoles) {
|
745 |
for (UserRole userRole : userRoles) {
|
| 746 |
roleIds.add(userRole.getRoleId());
|
746 |
roleIds.add(userRole.getRoleId());
|
| 747 |
}
|
747 |
}
|
| 748 |
List<Role> roles = roleRepository.selectByIds(roleIds);
|
748 |
List<Role> roles = roleRepository.selectByIds(roleIds);
|
| 749 |
Function<Role, String> roleToNameFunction = new Function<Role, String>() {
|
749 |
Function<Role, String> roleToNameFunction = role -> String.valueOf(role.getName());
|
| 750 |
public String apply(Role role) {
|
- |
|
| 751 |
return String.valueOf(role.getName());
|
- |
|
| 752 |
};
|
- |
|
| 753 |
};
|
- |
|
| 754 |
Set<String> userRoleStrings = roles.stream().map(roleToNameFunction).collect(Collectors.toSet());
|
750 |
Set<String> userRoleStrings = roles.stream().map(roleToNameFunction).collect(Collectors.toSet());
|
| 755 |
return String.join(", ", userRoleStrings);
|
751 |
return String.join(", ", userRoleStrings);
|
| 756 |
}
|
752 |
}
|
| 757 |
|
753 |
|
| 758 |
private FofoStore createFofoStoreCodeByRetailerId(int retailerId, String districtName, String stateName, UpdateRetailerRequest updateRetailerRequest) throws ProfitMandiBusinessException {
|
754 |
private FofoStore createFofoStoreCodeByRetailerId(int retailerId, String districtName, String stateName, UpdateRetailerRequest updateRetailerRequest) throws ProfitMandiBusinessException {
|