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
748cacf6
Commit
748cacf6
authored
Feb 22, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
63b3ec14
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
ReviewService.java
src/main/java/com/egolm/film/api/service/ReviewService.java
+1
-1
ReviewServiceImpl.java
...va/com/egolm/film/api/service/impl/ReviewServiceImpl.java
+3
-3
UserReviewController.java
...ava/com/egolm/film/api/web/user/UserReviewController.java
+13
-2
No files found.
src/main/java/com/egolm/film/api/service/ReviewService.java
View file @
748cacf6
...
...
@@ -123,7 +123,7 @@ public interface ReviewService {
void
allotShowFilmUser
(
Integer
review_id
,
Integer
[]
user_id
);
List
<
Map
<
String
,
Object
>>
queryUserShowList
(
Integer
user_id
);
List
<
Map
<
String
,
Object
>>
queryUserShowList
(
Integer
user_id
,
Page
page
);
void
toType4
(
Integer
id
);
...
...
src/main/java/com/egolm/film/api/service/impl/ReviewServiceImpl.java
View file @
748cacf6
...
...
@@ -147,7 +147,7 @@ public class ReviewServiceImpl implements ReviewService {
Integer
enroll_type_id
,
Page
page
)
{
SqlWhere
where
=
new
SqlWhere
()
.
lk
(
new
String
[]{
"mf.en_name"
,
"mf.cn_name"
}
,
keyword
)
.
lk
(
"mf.keywords"
,
keyword
)
.
ge
(
"r.push_time"
,
start_date
)
.
lt
(
"r.push_time"
,
end_date
==
null
?
null
:
DateUtil
.
end
(
end_date
))
.
ge
(
"r.review_time"
,
review_start_date
)
...
...
@@ -660,9 +660,9 @@ public class ReviewServiceImpl implements ReviewService {
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryUserShowList
(
Integer
user_id
)
{
public
List
<
Map
<
String
,
Object
>>
queryUserShowList
(
Integer
user_id
,
Page
page
)
{
String
sql
=
"select r.id review_id, mf.* from fc_review r left join fc_member_film mf on mf.id = r.film_id, fc_user_film uf where r.id = uf.review_id and uf.user_id = ?"
;
return
jdbcTemplate
.
queryForList
(
sql
,
user_id
);
return
jdbcTemplate
.
limit
(
sql
,
page
,
user_id
);
}
@Override
...
...
src/main/java/com/egolm/film/api/web/user/UserReviewController.java
View file @
748cacf6
...
...
@@ -84,10 +84,21 @@ public class UserReviewController {
@ResponseBody
@PostMapping
(
"show_list"
)
@ApiOperation
(
"看片列表"
)
public
Object
getReviewList
()
{
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
false
,
name
=
"index"
,
value
=
"分页页码"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
false
,
name
=
"limit"
,
value
=
"分页大小"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"limitKey"
,
value
=
"分页排序"
),
})
public
Object
getReviewList
(
String
[]
limitKey
,
Long
index
,
Long
limit
)
{
LoginToken
loginToken
=
tokenService
.
getToken
();
Integer
user_id
=
(
Integer
)
loginToken
.
getId
();
List
<
Map
<
String
,
Object
>>
list
=
service
.
queryUserShowList
(
user_id
);
index
=
index
==
null
?
1
:
index
;
limit
=
limit
==
null
?
20
:
limit
;
Page
page
=
new
Page
(
index
,
limit
,
limitKey
);
List
<
Map
<
String
,
Object
>>
list
=
service
.
queryUserShowList
(
user_id
,
page
);
return
Rjx
.
jsonOk
().
setData
(
list
);
}
...
...
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