Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
8bf5310e
Commit
8bf5310e
authored
Jun 02, 2022
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户列表
parent
7bf1558a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
portal-manager/src/main/java/com/mortals/xhx/module/user/web/UserController.java
.../java/com/mortals/xhx/module/user/web/UserController.java
+35
-0
No files found.
portal-manager/src/main/java/com/mortals/xhx/module/user/web/UserController.java
View file @
8bf5310e
package
com.mortals.xhx.module.user.web
;
package
com.mortals.xhx.module.user.web
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.module.param.service.ParamService
;
import
com.mortals.xhx.module.param.service.ParamService
;
import
com.mortals.xhx.module.role.model.RoleEntity
;
import
com.mortals.xhx.module.role.model.RoleQuery
;
import
com.mortals.xhx.module.role.model.RoleQuery
;
import
com.mortals.xhx.module.role.model.RoleUserEntity
;
import
com.mortals.xhx.module.role.model.RoleUserEntity
;
import
com.mortals.xhx.module.role.model.RoleUserQuery
;
import
com.mortals.xhx.module.role.model.RoleUserQuery
;
...
@@ -66,6 +69,8 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
...
@@ -66,6 +69,8 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
this
.
addDict
(
model
,
"userType"
,
paramService
.
getParamBySecondOrganize
(
"User"
,
"userType"
));
this
.
addDict
(
model
,
"userType"
,
paramService
.
getParamBySecondOrganize
(
"User"
,
"userType"
));
this
.
addDict
(
model
,
"status"
,
paramService
.
getParamBySecondOrganize
(
"User"
,
"status"
));
this
.
addDict
(
model
,
"status"
,
paramService
.
getParamBySecondOrganize
(
"User"
,
"status"
));
List
<
RoleEntity
>
roleList
=
roleService
.
find
(
new
RoleEntity
());
super
.
addDict
(
model
,
"roleId"
,
roleList
.
stream
().
collect
(
Collectors
.
toMap
(
e
->
e
.
getId
().
toString
(),
e
->
e
.
getName
())));
super
.
init
(
model
,
context
);
super
.
init
(
model
,
context
);
}
}
...
@@ -81,4 +86,34 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
...
@@ -81,4 +86,34 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
}
}
return
super
.
viewAfter
(
id
,
model
,
entity
,
context
);
return
super
.
viewAfter
(
id
,
model
,
entity
,
context
);
}
}
@Override
public
String
list
(
@RequestBody
(
required
=
false
)
UserEntity
query
)
{
Map
<
String
,
Object
>
model
=
new
HashMap
();
JSONObject
ret
=
new
JSONObject
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"查询"
+
this
.
getModuleDesc
();
int
code
;
try
{
PageInfo
pageInfo
=
this
.
buildPageInfo
(
query
);
this
.
doListBefore
(
query
,
model
,
context
);
Result
result
=
this
.
getService
().
findExt
(
query
,
pageInfo
,
context
);
model
.
put
(
"data"
,
result
.
getList
());
model
.
put
(
"pageInfo"
,
result
.
getPageInfo
());
this
.
parsePageInfo
(
model
,
result
.
getPageInfo
());
code
=
this
.
doListAfter
(
query
,
model
,
context
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
this
.
init
(
model
,
context
);
ret
.
put
(
"code"
,
code
);
ret
.
put
(
"msg"
,
model
.
remove
(
"message_info"
));
ret
.
put
(
"dict"
,
model
.
remove
(
"dict"
));
ret
.
put
(
"data"
,
model
);
return
ret
.
toJSONString
();
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment