Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
Grievance
Commits
e6e2f1c7
Commit
e6e2f1c7
authored
1 year ago
by
shishir suman
Browse files
Options
Download
Patches
Plain Diff
bug fixes
parent
9d633530
main
Escalate_ticket_send_mail_to_raiser
UAT
UPHRH_7903_mobile_otp
UPHRH_quartz_scheduler
Velocity_template_changes
admin_config_changes
bug_fixes_01_11
github/fork/vky25/patch-1
rahu_test
shishir_dynamic_schedular
shishir_ticket_statistics_by_user
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main/java/org/upsmf/grievance/controller/UserController.java
+1
-1
...n/java/org/upsmf/grievance/controller/UserController.java
src/main/java/org/upsmf/grievance/service/IntegrationService.java
+2
-2
.../java/org/upsmf/grievance/service/IntegrationService.java
src/main/java/org/upsmf/grievance/service/impl/IntegrationServiceImpl.java
+2
-2
.../upsmf/grievance/service/impl/IntegrationServiceImpl.java
with
5 additions
and
5 deletions
+5
-5
src/main/java/org/upsmf/grievance/controller/UserController.java
+
1
−
1
View file @
e6e2f1c7
...
...
@@ -114,7 +114,7 @@ public class UserController {
}
@GetMapping
(
"/info"
)
public
ResponseEntity
<
User
>
getUsersById
(
@RequestParam
(
"id"
)
long
id
)
throws
RuntimeException
{
public
ResponseEntity
<
User
ResponseDto
>
getUsersById
(
@RequestParam
(
"id"
)
long
id
)
throws
RuntimeException
{
return
integrationService
.
getUserById
(
id
);
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/upsmf/grievance/service/IntegrationService.java
+
2
−
2
View file @
e6e2f1c7
package
org.upsmf.grievance.service
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.JsonNode
;
import
com.google.api.gax.rpc.NotFoundException
;
import
org.springframework.http.ResponseEntity
;
import
org.upsmf.grievance.dto.CreateUserDto
;
import
org.upsmf.grievance.dto.UserDto
;
import
org.upsmf.grievance.dto.UserResponseDto
;
import
org.upsmf.grievance.model.User
;
public
interface
IntegrationService
{
...
...
@@ -21,7 +21,7 @@ public interface IntegrationService {
ResponseEntity
<
String
>
searchUsers
(
JsonNode
payload
)
throws
Exception
;
ResponseEntity
<
User
>
getUserById
(
long
id
)
throws
RuntimeException
;
ResponseEntity
<
User
ResponseDto
>
getUserById
(
long
id
)
throws
RuntimeException
;
void
assignRole
(
Long
userId
,
Long
roleId
)
throws
NotFoundException
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/upsmf/grievance/service/impl/IntegrationServiceImpl.java
+
2
−
2
View file @
e6e2f1c7
...
...
@@ -289,11 +289,11 @@ public class IntegrationServiceImpl implements IntegrationService {
}
@Override
public
ResponseEntity
<
User
>
getUserById
(
long
id
)
throws
RuntimeException
{
public
ResponseEntity
<
User
ResponseDto
>
getUserById
(
long
id
)
throws
RuntimeException
{
Optional
<
User
>
user
=
userRepository
.
findById
(
id
);
if
(
user
.
isPresent
())
{
User
userDetails
=
user
.
get
();
return
new
ResponseEntity
<>(
userDetails
,
HttpStatus
.
OK
);
return
new
ResponseEntity
<>(
createUserResponse
(
userDetails
)
,
HttpStatus
.
OK
);
}
throw
new
RuntimeException
(
"User details not found."
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets