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
3f0ff363
Commit
3f0ff363
authored
Oct 29, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善影片详情接口
parent
0ee9b359
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
12 deletions
+57
-12
UserReviewController.java
...in/java/com/egolm/film/api/user/UserReviewController.java
+28
-12
UserReviewService.java
...va/com/egolm/film/api/user/service/UserReviewService.java
+9
-0
UserReviewServiceImpl.java
...olm/film/api/user/service/impl/UserReviewServiceImpl.java
+20
-0
No files found.
src/main/java/com/egolm/film/api/user/UserReviewController.java
View file @
3f0ff363
...
@@ -11,9 +11,16 @@ import org.springframework.web.bind.annotation.ResponseBody;
...
@@ -11,9 +11,16 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.film.api.member.
MemberApplyController
;
import
com.egolm.film.api.member.
service.MemberService
;
import
com.egolm.film.api.user.service.UserReviewService
;
import
com.egolm.film.api.user.service.UserReviewService
;
import
com.egolm.film.api.user.service.UserTokenService
;
import
com.egolm.film.api.user.service.UserTokenService
;
import
com.egolm.film.bean.Fc_film
;
import
com.egolm.film.bean.Fc_film_doubtful_point
;
import
com.egolm.film.bean.Fc_film_review
;
import
com.egolm.film.bean.Fc_member_film_director
;
import
com.egolm.film.bean.Fc_member_film_issuer
;
import
com.egolm.film.bean.Fc_member_film_playactor
;
import
com.egolm.film.bean.Fc_member_film_show
;
import
com.egolm.film.model.LoginToken
;
import
com.egolm.film.model.LoginToken
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -67,6 +74,9 @@ public class UserReviewController {
...
@@ -67,6 +74,9 @@ public class UserReviewController {
return
Rjx
.
jsonOk
().
setData
(
list
).
setPage
(
page
);
return
Rjx
.
jsonOk
().
setData
(
list
).
setPage
(
page
);
}
}
@Autowired
private
MemberService
memberService
;
@ResponseBody
@ResponseBody
@PostMapping
(
"allot_detail"
)
@PostMapping
(
"allot_detail"
)
@ApiOperation
(
"影片信息详情"
)
@ApiOperation
(
"影片信息详情"
)
...
@@ -74,19 +84,25 @@ public class UserReviewController {
...
@@ -74,19 +84,25 @@ public class UserReviewController {
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"film_id"
,
value
=
"影片ID"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"film_id"
,
value
=
"影片ID"
),
})
})
public
Object
getAllotDetail
(
Long
film_id
)
{
public
Object
getAllotDetail
(
Long
film_id
)
{
LoginToken
loginToken
=
tokenService
.
getToken
();
Integer
user_id
=
(
Integer
)
loginToken
.
getId
();
Fc_film
film
=
reviewService
.
queryFilmById
(
film_id
);
Map
<
String
,
Object
>
map
=
reviewService
.
queryAllotDetailByFilmId
(
film_id
);
Map
<
String
,
Object
>
map
=
reviewService
.
queryAllotDetailByFilmId
(
film_id
);
Long
member_film_id
=
reviewService
.
queryMemberFilmIdByFilmId
(
film_id
);
Long
member_film_id
=
reviewService
.
queryMemberFilmIdByFilmId
(
film_id
);
return
Rjx
.
jsonOk
().
setData
(
map
).
set
(
"member_film_id"
,
member_film_id
);
List
<
Fc_member_film_director
>
directorList
=
memberService
.
queryMemberFilmDirectorList
(
member_film_id
);
List
<
Fc_member_film_issuer
>
issuerList
=
memberService
.
queryMemberFilmIssuerList
(
member_film_id
);
List
<
Fc_member_film_playactor
>
playactorList
=
memberService
.
queryMemberFilmPlayactorList
(
member_film_id
);
List
<
Fc_member_film_show
>
showList
=
memberService
.
queryMemberFilmShowList
(
member_film_id
);
List
<
Fc_film_review
>
reviewList
=
reviewService
.
queryRoundReviewListByUserId
(
user_id
,
film
.
getRound
(),
film_id
);
List
<
Fc_film_doubtful_point
>
doubtfulList
=
reviewService
.
queryDoubtfulListByUserId
(
user_id
,
film_id
);
return
Rjx
.
jsonOk
()
.
setData
(
map
)
.
set
(
"directorList"
,
directorList
)
.
set
(
"issuerList"
,
issuerList
)
.
set
(
"playactorList"
,
playactorList
)
.
set
(
"showList"
,
showList
)
.
set
(
"reviewList"
,
reviewList
)
.
set
(
"doubtfulList"
,
doubtfulList
);
}
}
@Autowired
MemberApplyController
memberApplyController
;
@ResponseBody
@PostMapping
(
"member_film_detail"
)
@ApiOperation
(
"获取全部申报信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"member_film_id"
,
value
=
"申报影片ID"
)})
public
Object
getMemberFilmDetail
(
Long
member_film_id
)
{
return
memberApplyController
.
getDetail
(
member_film_id
);
}
}
}
src/main/java/com/egolm/film/api/user/service/UserReviewService.java
View file @
3f0ff363
...
@@ -4,6 +4,9 @@ import java.util.List;
...
@@ -4,6 +4,9 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.film.bean.Fc_film
;
import
com.egolm.film.bean.Fc_film_doubtful_point
;
import
com.egolm.film.bean.Fc_film_review
;
public
interface
UserReviewService
{
public
interface
UserReviewService
{
...
@@ -15,4 +18,10 @@ public interface UserReviewService {
...
@@ -15,4 +18,10 @@ public interface UserReviewService {
Long
queryMemberFilmIdByFilmId
(
Long
film_id
);
Long
queryMemberFilmIdByFilmId
(
Long
film_id
);
List
<
Fc_film_review
>
queryRoundReviewListByUserId
(
Integer
user_id
,
Integer
round
,
Long
film_id
);
List
<
Fc_film_doubtful_point
>
queryDoubtfulListByUserId
(
Integer
user_id
,
Long
film_id
);
Fc_film
queryFilmById
(
Long
film_id
);
}
}
src/main/java/com/egolm/film/api/user/service/impl/UserReviewServiceImpl.java
View file @
3f0ff363
...
@@ -9,6 +9,9 @@ import org.springframework.stereotype.Service;
...
@@ -9,6 +9,9 @@ import org.springframework.stereotype.Service;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.film.api.user.service.UserReviewService
;
import
com.egolm.film.api.user.service.UserReviewService
;
import
com.egolm.film.bean.Fc_film
;
import
com.egolm.film.bean.Fc_film_doubtful_point
;
import
com.egolm.film.bean.Fc_film_review
;
@Service
@Service
public
class
UserReviewServiceImpl
implements
UserReviewService
{
public
class
UserReviewServiceImpl
implements
UserReviewService
{
...
@@ -90,4 +93,21 @@ public class UserReviewServiceImpl implements UserReviewService {
...
@@ -90,4 +93,21 @@ public class UserReviewServiceImpl implements UserReviewService {
return
jdbcTemplate
.
queryForLong
(
sql
,
film_id
);
return
jdbcTemplate
.
queryForLong
(
sql
,
film_id
);
}
}
@Override
public
List
<
Fc_film_review
>
queryRoundReviewListByUserId
(
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 = ?"
;
return
jdbcTemplate
.
queryForBeans
(
sql
,
Fc_film_review
.
class
,
film_id
,
user_id
,
round
);
}
@Override
public
List
<
Fc_film_doubtful_point
>
queryDoubtfulListByUserId
(
Integer
user_id
,
Long
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
);
}
@Override
public
Fc_film
queryFilmById
(
Long
film_id
)
{
return
jdbcTemplate
.
queryForBean
(
"select * from fc_film where id = ?"
,
Fc_film
.
class
,
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