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
31bd0064
Commit
31bd0064
authored
Oct 18, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加失败提示
parent
06c87acc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
MemberInfoController.java
.../java/com/egolm/film/api/member/MemberInfoController.java
+11
-1
messages_en_US.properties
src/main/resources/i18n/messages_en_US.properties
+1
-0
messages_zh_CN.properties
src/main/resources/i18n/messages_zh_CN.properties
+1
-0
No files found.
src/main/java/com/egolm/film/api/member/MemberInfoController.java
View file @
31bd0064
...
@@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
...
@@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.film.api.member.service.MemberService
;
import
com.egolm.film.api.member.service.MemberService
;
import
com.egolm.film.bean.Fc_member
;
import
com.egolm.film.bean.Fc_member
;
import
com.egolm.film.common.Messages
;
import
com.egolm.film.config.XException
;
import
com.egolm.film.login.service.MemberTokenService
;
import
com.egolm.film.login.service.MemberTokenService
;
import
com.egolm.film.model.LoginToken
;
import
com.egolm.film.model.LoginToken
;
...
@@ -28,6 +30,9 @@ public class MemberInfoController {
...
@@ -28,6 +30,9 @@ public class MemberInfoController {
@Autowired
@Autowired
private
MemberService
memberService
;
private
MemberService
memberService
;
@Autowired
private
Messages
messages
;
@ResponseBody
@ResponseBody
@PostMapping
(
"query"
)
@PostMapping
(
"query"
)
@ApiOperation
(
"查询会员基本信息"
)
@ApiOperation
(
"查询会员基本信息"
)
...
@@ -63,9 +68,14 @@ public class MemberInfoController {
...
@@ -63,9 +68,14 @@ public class MemberInfoController {
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"newPassword"
,
value
=
"新密码"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
true
,
name
=
"newPassword"
,
value
=
"新密码"
),
})
})
public
Object
changePassword
(
String
password
,
String
newPassword
)
{
public
Object
changePassword
(
String
password
,
String
newPassword
)
{
XException
.
assertNotBlank
(
messages
.
get
(
"err.pwd_null"
),
password
,
newPassword
);
LoginToken
loginToken
=
tokenService
.
getToken
();
LoginToken
loginToken
=
tokenService
.
getToken
();
Integer
id
=
(
Integer
)
loginToken
.
getId
();
Integer
id
=
(
Integer
)
loginToken
.
getId
();
boolean
boo
=
memberService
.
changePasswordByMemberId
(
id
,
password
,
newPassword
);
boolean
boo
=
memberService
.
changePasswordByMemberId
(
id
,
password
,
newPassword
);
return
Rjx
.
json
().
setCode
(
boo
?
200
:
500
);
if
(
boo
)
{
return
Rjx
.
jsonOk
();
}
else
{
return
Rjx
.
jsonErr
().
setMessage
(
messages
.
get
(
"err.pwd_error"
));
}
}
}
}
}
src/main/resources/i18n/messages_en_US.properties
View file @
31bd0064
...
@@ -10,5 +10,6 @@ err.user_exists=User already exists
...
@@ -10,5 +10,6 @@ err.user_exists=User already exists
err.email_null
=
The mailbox can not be empty
err.email_null
=
The mailbox can not be empty
err.name_null
=
The username can not be empty
err.name_null
=
The username can not be empty
err.pwd_null
=
The password can not be empty
err.pwd_null
=
The password can not be empty
err.pwd_error
=
Password error
err.args_nums
=
Incorrect number of parameters
err.args_nums
=
Incorrect number of parameters
src/main/resources/i18n/messages_zh_CN.properties
View file @
31bd0064
...
@@ -10,5 +10,6 @@ err.user_exists=\u7528\u6237\u5DF2\u5B58\u5728
...
@@ -10,5 +10,6 @@ err.user_exists=\u7528\u6237\u5DF2\u5B58\u5728
err.email_null=
\u
90AE
\u
7BB1
\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
err.email_null=
\u
90AE
\u
7BB1
\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
err.name_null
=
\u
59D3
\u
540D
\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
err.name_null
=
\u
59D3
\u
540D
\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
err.pwd_null
=
\u
5BC6
\u7801\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
err.pwd_null
=
\u
5BC6
\u7801\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
err.pwd_error
=
\u
5BC6
\u7801\u9519\u
8BEF
err.args_nums
=
\u
653E
\u6620\u
53C2
\u6570\u6570\u
91CF
\u9519\u
8BEF
err.args_nums
=
\u
653E
\u6620\u
53C2
\u6570\u6570\u
91CF
\u9519\u
8BEF
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