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
2b85ed6b
Commit
2b85ed6b
authored
Nov 20, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xx
parent
beda9746
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
MemberInfoController.java
.../java/com/egolm/film/api/member/MemberInfoController.java
+5
-1
MemberLoginController.java
...java/com/egolm/film/api/member/MemberLoginController.java
+1
-5
No files found.
src/main/java/com/egolm/film/api/member/MemberInfoController.java
View file @
2b85ed6b
package
com
.
egolm
.
film
.
api
.
member
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -33,6 +34,9 @@ public class MemberInfoController {
@Autowired
private
Messages
messages
;
@Value
(
"${opt.member_id}"
)
private
Integer
opt_member_id
;
@ResponseBody
@PostMapping
(
"query"
)
@ApiOperation
(
"查询会员基本信息"
)
...
...
@@ -43,7 +47,7 @@ public class MemberInfoController {
LoginToken
loginToken
=
tokenService
.
getToken
();
Integer
id
=
(
Integer
)
loginToken
.
getId
();
Fc_member
member
=
memberService
.
getMemberById
(
id
);
return
Rjx
.
jsonOk
().
setData
(
member
);
return
Rjx
.
jsonOk
().
setData
(
member
)
.
set
(
"show"
,
id
.
compareTo
(
opt_member_id
)
==
0
)
;
}
@ResponseBody
...
...
src/main/java/com/egolm/film/api/member/MemberLoginController.java
View file @
2b85ed6b
package
com
.
egolm
.
film
.
api
.
member
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -29,9 +28,6 @@ public class MemberLoginController {
@Autowired
private
MemberTokenService
tokenService
;
@Value
(
"${opt.member_id}"
)
private
Integer
opt_member_id
;
@ResponseBody
@PostMapping
(
"login"
)
@ApiOperation
(
"登陆"
)
...
...
@@ -46,7 +42,7 @@ public class MemberLoginController {
LoginToken
token
=
tokenService
.
doLogin
(
username
,
password
);
if
(
token
!=
null
)
{
return
Rjx
.
jsonOk
()
.
set
(
"show"
,
opt_member_id
.
intValue
()
==
((
Integer
)
token
.
getId
()).
intValue
())
;
return
Rjx
.
jsonOk
();
}
else
{
throw
new
XException
(
messages
.
get
(
"err.user_or_pwd"
));
}
...
...
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