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
171b6964
Commit
171b6964
authored
Nov 24, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xx
parent
d714f253
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
MemberService.java
src/main/java/com/egolm/film/api/service/MemberService.java
+2
-0
MemberServiceImpl.java
...va/com/egolm/film/api/service/impl/MemberServiceImpl.java
+5
-0
OpenMemberApiController.java
.../java/com/egolm/film/api/web/OpenMemberApiController.java
+11
-0
No files found.
src/main/java/com/egolm/film/api/service/MemberService.java
View file @
171b6964
...
...
@@ -35,4 +35,6 @@ public interface MemberService {
void
updateToken
(
Integer
member_id
,
String
token_string
);
void
updateLang
(
Integer
id
,
String
string
);
}
src/main/java/com/egolm/film/api/service/impl/MemberServiceImpl.java
View file @
171b6964
...
...
@@ -109,4 +109,9 @@ public class MemberServiceImpl implements MemberService {
jdbcTemplate
.
executeUpdate
(
sql
,
token_string
,
member_id
);
}
@Override
public
void
updateLang
(
Integer
id
,
String
lang
)
{
jdbcTemplate
.
executeUpdate
(
"update fc_member set lang = ? where id = ?"
,
lang
,
id
);
}
}
src/main/java/com/egolm/film/api/web/OpenMemberApiController.java
View file @
171b6964
...
...
@@ -19,10 +19,12 @@ import com.egolm.common.bean.Rjx;
import
com.egolm.common.web.ServletUtil
;
import
com.egolm.film.api.service.EmailService
;
import
com.egolm.film.api.service.MemberService
;
import
com.egolm.film.api.service.MemberTokenService
;
import
com.egolm.film.api.service.Messages
;
import
com.egolm.film.bean.Fc_member
;
import
com.egolm.film.config.XException
;
import
com.egolm.film.config.interceptor.LocaleInterceptor
;
import
com.egolm.film.model.LoginToken
;
import
com.egolm.film.util.Common
;
import
io.swagger.annotations.Api
;
...
...
@@ -44,6 +46,9 @@ public class OpenMemberApiController {
@Autowired
private
MemberService
memberService
;
@Autowired
private
MemberTokenService
memberTokenService
;
@ResponseBody
@PostMapping
(
"register"
)
@ApiOperation
(
"会员注册"
)
...
...
@@ -132,6 +137,12 @@ public class OpenMemberApiController {
cookie
.
setMaxAge
(
3600000
);
cookie
.
setPath
(
"/"
);
response
.
addCookie
(
cookie
);
LoginToken
token
=
memberTokenService
.
getToken
();
if
(
token
!=
null
)
{
memberService
.
updateLang
((
Integer
)
token
.
getId
(),
i18n_language
.
split
(
"_"
)[
0
]);
}
return
Rjx
.
jsonOk
();
}
...
...
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