Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
member-api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
member-api
Commits
5463c846
Commit
5463c846
authored
Nov 21, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xx
parent
87da6ab4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
AdminAuthController.java
...in/java/com/egolm/film/api/admin/AdminAuthController.java
+10
-7
No files found.
src/main/java/com/egolm/film/api/admin/AdminAuthController.java
View file @
5463c846
package
com
.
egolm
.
film
.
api
.
admin
;
import
java.io.
File
;
import
java.io.
BufferedReader
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.io.ClassPathResource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ResourceUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.alibaba.fastjson.JSON
;
import
com.egolm.common.FileUtil
;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.Page
;
...
...
@@ -148,10 +150,11 @@ public class AdminAuthController {
@ResponseBody
@PostMapping
(
"allAuth"
)
@ApiOperation
(
"全部管理组权限查询"
)
public
Object
allAuth
()
throws
FileNotFoundException
{
File
file
=
ResourceUtils
.
getFile
(
"classpath:auth_admin.json"
);
String
json
=
FileUtil
.
fileToString
(
file
);
return
Rjx
.
jsonOk
().
setData
(
JSON
.
parseArray
(
json
));
public
Object
allAuth
()
throws
IOException
{
Resource
resource
=
new
ClassPathResource
(
"auth_admin.json"
);
BufferedReader
br
=
new
BufferedReader
(
new
InputStreamReader
(
resource
.
getInputStream
()));
String
text
=
StringUtil
.
read
(
br
);
return
Rjx
.
jsonOk
().
setData
(
JSON
.
parseArray
(
text
));
}
@ResponseBody
...
...
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