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
f730b062
Commit
f730b062
authored
Nov 20, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xx
parent
ee7d3cf0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
MemberApplyController.java
...java/com/egolm/film/api/member/MemberApplyController.java
+7
-8
MemberService.java
...java/com/egolm/film/api/member/service/MemberService.java
+2
-0
MemberServiceImpl.java
...egolm/film/api/member/service/impl/MemberServiceImpl.java
+11
-0
No files found.
src/main/java/com/egolm/film/api/member/MemberApplyController.java
View file @
f730b062
...
...
@@ -10,7 +10,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.film.api.member.service.MemberService
;
import
com.egolm.film.api.member.service.MemberTokenService
;
...
...
@@ -44,15 +43,15 @@ public class MemberApplyController {
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
dataType
=
"string"
,
name
=
"i18n_language"
)
})
public
Object
list
(
String
email
)
{
Integer
member_id
=
null
;
if
(
StringUtil
.
isNotBlank
(
email
))
{
member_id
=
memberService
.
getMemberByEmail
(
email
).
getId
();
public
Object
list
(
String
keyword
)
{
LoginToken
loginToken
=
tokenService
.
getToken
();
Integer
member_id
=
(
Integer
)
loginToken
.
getId
();
List
<
Map
<
String
,
Object
>>
list
=
null
;
if
(
member_id
==
3785
)
{
list
=
memberService
.
queryListAll
(
keyword
);
}
else
{
LoginToken
loginToken
=
tokenService
.
getToken
();
member_id
=
(
Integer
)
loginToken
.
getId
();
list
=
memberService
.
queryListByMemberID
(
member_id
);
}
List
<
Map
<
String
,
Object
>>
list
=
memberService
.
queryListByMemberID
(
member_id
);
return
Rjx
.
jsonOk
().
setData
(
list
);
}
...
...
src/main/java/com/egolm/film/api/member/service/MemberService.java
View file @
f730b062
...
...
@@ -130,4 +130,6 @@ public interface MemberService {
void
updateToken
(
Integer
member_id
,
String
token_string
);
List
<
Map
<
String
,
Object
>>
queryListAll
(
String
keyword
);
}
src/main/java/com/egolm/film/api/member/service/impl/MemberServiceImpl.java
View file @
f730b062
...
...
@@ -482,4 +482,15 @@ public class MemberServiceImpl implements MemberService {
jdbcTemplate
.
executeUpdate
(
sql
,
token_string
,
member_id
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryListAll
(
String
keyword
)
{
if
(
StringUtil
.
isBlank
(
keyword
))
{
String
sql
=
"select * from fc_member_film"
;
return
jdbcTemplate
.
queryForList
(
sql
);
}
else
{
String
sql
=
"select * from fc_member_film where en_name like ? or cn_name like ?"
;
return
jdbcTemplate
.
queryForList
(
sql
,
"%"
+
keyword
+
"%"
,
"%"
+
keyword
+
"%"
);
}
}
}
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