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
99e999b0
Commit
99e999b0
authored
Oct 29, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码
parent
e840ffab
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
UserReviewController.java
...in/java/com/egolm/film/api/user/UserReviewController.java
+4
-4
UserReviewService.java
...va/com/egolm/film/api/user/service/UserReviewService.java
+4
-4
UserReviewServiceImpl.java
...olm/film/api/user/service/impl/UserReviewServiceImpl.java
+4
-4
No files found.
src/main/java/com/egolm/film/api/user/UserReviewController.java
View file @
99e999b0
...
@@ -56,7 +56,7 @@ public class UserReviewController {
...
@@ -56,7 +56,7 @@ public class UserReviewController {
LoginToken
loginToken
=
tokenService
.
getToken
();
LoginToken
loginToken
=
tokenService
.
getToken
();
Integer
user_id
=
(
Integer
)
loginToken
.
getId
();
Integer
user_id
=
(
Integer
)
loginToken
.
getId
();
Page
page
=
new
Page
(
index
,
limit
,
limitKey
);
Page
page
=
new
Page
(
index
,
limit
,
limitKey
);
List
<
Map
<
String
,
Object
>>
list
=
reviewService
.
limitReview
ByUserId
(
user_id
,
page
);
List
<
Map
<
String
,
Object
>>
list
=
reviewService
.
limitReview
List
(
user_id
,
page
);
return
Rjx
.
jsonOk
().
setData
(
list
).
setPage
(
page
);
return
Rjx
.
jsonOk
().
setData
(
list
).
setPage
(
page
);
}
}
...
@@ -73,7 +73,7 @@ public class UserReviewController {
...
@@ -73,7 +73,7 @@ public class UserReviewController {
LoginToken
loginToken
=
tokenService
.
getToken
();
LoginToken
loginToken
=
tokenService
.
getToken
();
Integer
user_id
=
(
Integer
)
loginToken
.
getId
();
Integer
user_id
=
(
Integer
)
loginToken
.
getId
();
Page
page
=
new
Page
(
index
,
limit
,
limitKey
);
Page
page
=
new
Page
(
index
,
limit
,
limitKey
);
List
<
Map
<
String
,
Object
>>
list
=
reviewService
.
limitUnview
ByUserId
(
user_id
,
page
);
List
<
Map
<
String
,
Object
>>
list
=
reviewService
.
limitUnview
List
(
user_id
,
page
);
return
Rjx
.
jsonOk
().
setData
(
list
).
setPage
(
page
);
return
Rjx
.
jsonOk
().
setData
(
list
).
setPage
(
page
);
}
}
...
@@ -111,7 +111,7 @@ public class UserReviewController {
...
@@ -111,7 +111,7 @@ public class UserReviewController {
LoginToken
loginToken
=
tokenService
.
getToken
();
LoginToken
loginToken
=
tokenService
.
getToken
();
Integer
user_id
=
(
Integer
)
loginToken
.
getId
();
Integer
user_id
=
(
Integer
)
loginToken
.
getId
();
Integer
round
=
reviewService
.
queryRound
(
user_id
,
film_id
);
Integer
round
=
reviewService
.
queryRound
(
user_id
,
film_id
);
List
<
Fc_film_review
>
reviewList
=
reviewService
.
queryRoundReviewList
ByUserId
(
user_id
,
round
,
film_id
);
List
<
Fc_film_review
>
reviewList
=
reviewService
.
queryRoundReviewList
(
user_id
,
round
,
film_id
);
return
Rjx
.
jsonOk
().
setData
(
reviewList
);
return
Rjx
.
jsonOk
().
setData
(
reviewList
);
}
}
...
@@ -124,7 +124,7 @@ public class UserReviewController {
...
@@ -124,7 +124,7 @@ public class UserReviewController {
public
Object
getDoubtfulList
(
Long
film_id
)
{
public
Object
getDoubtfulList
(
Long
film_id
)
{
LoginToken
loginToken
=
tokenService
.
getToken
();
LoginToken
loginToken
=
tokenService
.
getToken
();
Integer
user_id
=
(
Integer
)
loginToken
.
getId
();
Integer
user_id
=
(
Integer
)
loginToken
.
getId
();
List
<
Fc_film_doubtful_point
>
doubtfulList
=
reviewService
.
queryDoubtfulList
ByUserId
(
user_id
,
film_id
);
List
<
Fc_film_doubtful_point
>
doubtfulList
=
reviewService
.
queryDoubtfulList
(
user_id
,
film_id
);
return
Rjx
.
jsonOk
().
setData
(
doubtfulList
);
return
Rjx
.
jsonOk
().
setData
(
doubtfulList
);
}
}
...
...
src/main/java/com/egolm/film/api/user/service/UserReviewService.java
View file @
99e999b0
...
@@ -10,15 +10,15 @@ import com.egolm.film.bean.Fc_film_review;
...
@@ -10,15 +10,15 @@ import com.egolm.film.bean.Fc_film_review;
public
interface
UserReviewService
{
public
interface
UserReviewService
{
List
<
Map
<
String
,
Object
>>
limitReview
ByUserId
(
Integer
user_id
,
Page
page
);
List
<
Map
<
String
,
Object
>>
limitReview
List
(
Integer
user_id
,
Page
page
);
List
<
Map
<
String
,
Object
>>
limitUnview
ByUserId
(
Integer
user_id
,
Page
page
);
List
<
Map
<
String
,
Object
>>
limitUnview
List
(
Integer
user_id
,
Page
page
);
Long
queryMemberFilmIdByFilmId
(
Long
film_id
);
Long
queryMemberFilmIdByFilmId
(
Long
film_id
);
List
<
Fc_film_review
>
queryRoundReviewList
ByUserId
(
Integer
user_id
,
Integer
round
,
Long
film_id
);
List
<
Fc_film_review
>
queryRoundReviewList
(
Integer
user_id
,
Integer
round
,
Long
film_id
);
List
<
Fc_film_doubtful_point
>
queryDoubtfulList
ByUserId
(
Integer
user_id
,
Long
film_id
);
List
<
Fc_film_doubtful_point
>
queryDoubtfulList
(
Integer
user_id
,
Long
film_id
);
Fc_film
queryFilmById
(
Long
film_id
);
Fc_film
queryFilmById
(
Long
film_id
);
...
...
src/main/java/com/egolm/film/api/user/service/impl/UserReviewServiceImpl.java
View file @
99e999b0
...
@@ -20,7 +20,7 @@ public class UserReviewServiceImpl implements UserReviewService {
...
@@ -20,7 +20,7 @@ public class UserReviewServiceImpl implements UserReviewService {
private
JdbcTemplate
jdbcTemplate
;
private
JdbcTemplate
jdbcTemplate
;
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
limitReview
ByUserId
(
Integer
user_id
,
Page
page
)
{
public
List
<
Map
<
String
,
Object
>>
limitReview
List
(
Integer
user_id
,
Page
page
)
{
String
sql
=
""
String
sql
=
""
+
" select "
+
" select "
+
"film.*, "
+
"film.*, "
...
@@ -41,7 +41,7 @@ public class UserReviewServiceImpl implements UserReviewService {
...
@@ -41,7 +41,7 @@ public class UserReviewServiceImpl implements UserReviewService {
}
}
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
limitUnview
ByUserId
(
Integer
user_id
,
Page
page
)
{
public
List
<
Map
<
String
,
Object
>>
limitUnview
List
(
Integer
user_id
,
Page
page
)
{
String
sql
=
""
String
sql
=
""
+
" select "
+
" select "
+
"film.*, "
+
"film.*, "
...
@@ -68,13 +68,13 @@ public class UserReviewServiceImpl implements UserReviewService {
...
@@ -68,13 +68,13 @@ public class UserReviewServiceImpl implements UserReviewService {
}
}
@Override
@Override
public
List
<
Fc_film_review
>
queryRoundReviewList
ByUserId
(
Integer
user_id
,
Integer
round
,
Long
film_id
)
{
public
List
<
Fc_film_review
>
queryRoundReviewList
(
Integer
user_id
,
Integer
round
,
Long
film_id
)
{
String
sql
=
"SELECT fc_film_review.* FROM fc_film_review WHERE film_id = ? AND uid = ? AND round = ?"
;
String
sql
=
"SELECT fc_film_review.* FROM fc_film_review WHERE film_id = ? AND uid = ? AND round = ?"
;
return
jdbcTemplate
.
queryForBeans
(
sql
,
Fc_film_review
.
class
,
film_id
,
user_id
,
round
);
return
jdbcTemplate
.
queryForBeans
(
sql
,
Fc_film_review
.
class
,
film_id
,
user_id
,
round
);
}
}
@Override
@Override
public
List
<
Fc_film_doubtful_point
>
queryDoubtfulList
ByUserId
(
Integer
user_id
,
Long
film_id
)
{
public
List
<
Fc_film_doubtful_point
>
queryDoubtfulList
(
Integer
user_id
,
Long
film_id
)
{
String
sql
=
"SELECT * FROM fc_film_doubtful_point WHERE uid = ? AND film_id = ?"
;
String
sql
=
"SELECT * FROM fc_film_doubtful_point WHERE uid = ? AND film_id = ?"
;
return
jdbcTemplate
.
queryForBeans
(
sql
,
Fc_film_doubtful_point
.
class
,
user_id
,
film_id
);
return
jdbcTemplate
.
queryForBeans
(
sql
,
Fc_film_doubtful_point
.
class
,
user_id
,
film_id
);
}
}
...
...
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