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
uphrh-smf-user
Commits
b68189e5
Commit
b68189e5
authored
3 years ago
by
nivetha
Browse files
Options
Download
Patches
Plain Diff
Get all role response entity
parent
3d8500ea
master
bulkupload
delete-user
delete-user-fix
increase_timeout
institute-district
maney-test
sessionTimeout
updateEmailContentforOTP
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/com/tarento/retail/controller/RoleActionController.java
+8
-2
...a/com/tarento/retail/controller/RoleActionController.java
src/main/java/com/tarento/retail/dao/impl/RoleDaoImpl.java
+1
-0
src/main/java/com/tarento/retail/dao/impl/RoleDaoImpl.java
with
9 additions
and
2 deletions
+9
-2
src/main/java/com/tarento/retail/controller/RoleActionController.java
+
8
−
2
View file @
b68189e5
...
...
@@ -45,13 +45,19 @@ public class RoleActionController {
}
@RequestMapping
(
value
=
PathRoutes
.
RoleActionRoutes
.
GET_ALL_ROLES
,
method
=
RequestMethod
.
GET
)
public
List
<
Role
>
listRoles
(
@RequestHeader
(
value
=
Constants
.
USER_INFO_HEADER
,
required
=
false
)
String
xUserInfo
)
{
public
String
listRoles
(
@RequestHeader
(
value
=
Constants
.
USER_INFO_HEADER
,
required
=
false
)
String
xUserInfo
)
throws
JsonProcessingException
{
Long
orgId
=
null
;
if
(
StringUtils
.
isNotBlank
(
xUserInfo
))
{
User
userInfo
=
new
Gson
().
fromJson
(
xUserInfo
,
User
.
class
);
orgId
=
Long
.
parseLong
(
userInfo
.
getOrgId
());
}
return
roleActionService
.
getAllRoles
(
orgId
);
orgId
=
1L
;
List
<
Role
>
rolesList
=
roleActionService
.
getAllRoles
(
orgId
);
if
(
rolesList
!=
null
)
{
return
ResponseGenerator
.
successResponse
(
rolesList
);
}
return
ResponseGenerator
.
failureResponse
(
Constants
.
PROCESS_FAIL
);
}
@RequestMapping
(
value
=
PathRoutes
.
RoleActionRoutes
.
GET_DEFAULT_ROLES_BY_DOMAIN
,
method
=
RequestMethod
.
GET
)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/tarento/retail/dao/impl/RoleDaoImpl.java
+
1
−
0
View file @
b68189e5
...
...
@@ -145,6 +145,7 @@ public class RoleDaoImpl implements RoleDao {
new
SqlDataMapper
().
new
RoleMapper
());
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"Encountered an exception while fetching all roles"
+
e
);
return
null
;
}
return
roleList
;
}
...
...
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