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
1add5911
Commit
1add5911
authored
Nov 02, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改审片检索条件
parent
1eab81a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
24 deletions
+17
-24
UserReviewController.java
...in/java/com/egolm/film/api/user/UserReviewController.java
+6
-8
UserReviewService.java
...va/com/egolm/film/api/user/service/UserReviewService.java
+2
-2
UserReviewServiceImpl.java
...olm/film/api/user/service/impl/UserReviewServiceImpl.java
+9
-14
No files found.
src/main/java/com/egolm/film/api/user/UserReviewController.java
View file @
1add5911
...
...
@@ -50,18 +50,17 @@ public class UserReviewController {
@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
=
"分页排序"
,
allowMultiple
=
true
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"date"
,
required
=
false
,
name
=
"start_time"
,
value
=
"开始时间"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"date"
,
required
=
false
,
name
=
"end_time"
,
value
=
"结束时间"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"date"
,
required
=
false
,
name
=
"push_date"
,
value
=
"推送日期"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"film_type_name"
,
value
=
"影片类型"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"keyword"
,
value
=
"模糊匹配关键词"
),
})
public
Object
getReviewList
(
Long
index
,
Long
limit
,
String
[]
limitKey
,
Date
start_time
,
Date
end_tim
e
,
String
film_type_name
,
String
keyword
)
{
public
Object
getReviewList
(
Long
index
,
Long
limit
,
String
[]
limitKey
,
Date
push_dat
e
,
String
film_type_name
,
String
keyword
)
{
index
=
index
==
null
?
1
:
index
;
limit
=
limit
==
null
?
20
:
limit
;
LoginToken
loginToken
=
tokenService
.
getToken
();
Long
user_id
=
(
Long
)
loginToken
.
getId
();
Page
page
=
new
Page
(
index
,
limit
,
limitKey
);
List
<
Map
<
String
,
Object
>>
list
=
reviewService
.
limitReviewList
(
user_id
,
page
,
start_time
,
end_tim
e
,
film_type_name
,
keyword
);
List
<
Map
<
String
,
Object
>>
list
=
reviewService
.
limitReviewList
(
user_id
,
page
,
push_dat
e
,
film_type_name
,
keyword
);
return
Rjx
.
jsonOk
().
setData
(
list
).
setPage
(
page
);
}
...
...
@@ -73,16 +72,15 @@ public class UserReviewController {
@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
=
"分页排序"
,
allowMultiple
=
true
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"date"
,
required
=
false
,
name
=
"start_time"
,
value
=
"开始时间"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"date"
,
required
=
false
,
name
=
"end_time"
,
value
=
"结束时间"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"date"
,
required
=
false
,
name
=
"push_date"
,
value
=
"推送日期"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"film_type_name"
,
value
=
"影片类型"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"keyword"
,
value
=
"模糊匹配关键词"
),
})
public
Object
getUnviewList
(
Long
index
,
Long
limit
,
String
[]
limitKey
,
Date
start_time
,
Date
end_tim
e
,
String
film_type_name
,
String
keyword
)
{
public
Object
getUnviewList
(
Long
index
,
Long
limit
,
String
[]
limitKey
,
Date
push_dat
e
,
String
film_type_name
,
String
keyword
)
{
LoginToken
loginToken
=
tokenService
.
getToken
();
Long
user_id
=
(
Long
)
loginToken
.
getId
();
Page
page
=
new
Page
(
index
,
limit
,
limitKey
);
List
<
Map
<
String
,
Object
>>
list
=
reviewService
.
limitUnviewList
(
user_id
,
page
,
start_time
,
end_tim
e
,
film_type_name
,
keyword
);
List
<
Map
<
String
,
Object
>>
list
=
reviewService
.
limitUnviewList
(
user_id
,
page
,
push_dat
e
,
film_type_name
,
keyword
);
return
Rjx
.
jsonOk
().
setData
(
list
).
setPage
(
page
);
}
...
...
src/main/java/com/egolm/film/api/user/service/UserReviewService.java
View file @
1add5911
...
...
@@ -12,9 +12,9 @@ import com.egolm.film.bean.Fc_film_review;
public
interface
UserReviewService
{
List
<
Map
<
String
,
Object
>>
limitReviewList
(
Long
user_id
,
Page
page
,
Date
start_time
,
Date
end_tim
e
,
String
film_type_name
,
String
keyword
);
List
<
Map
<
String
,
Object
>>
limitReviewList
(
Long
user_id
,
Page
page
,
Date
push_dat
e
,
String
film_type_name
,
String
keyword
);
List
<
Map
<
String
,
Object
>>
limitUnviewList
(
Long
user_id
,
Page
page
,
Date
start_time
,
Date
end_tim
e
,
String
film_type_name
,
String
keyword
);
List
<
Map
<
String
,
Object
>>
limitUnviewList
(
Long
user_id
,
Page
page
,
Date
push_dat
e
,
String
film_type_name
,
String
keyword
);
Long
queryMemberFilmIdByFilmId
(
Long
film_id
);
...
...
src/main/java/com/egolm/film/api/user/service/impl/UserReviewServiceImpl.java
View file @
1add5911
...
...
@@ -31,21 +31,19 @@ public class UserReviewServiceImpl implements UserReviewService {
public
List
<
Map
<
String
,
Object
>>
limitReviewList
(
Long
user_id
,
Page
page
,
Date
start_time
,
Date
end_time
,
Date
push_date
,
String
film_type_name
,
String
keyword
)
{
List
<
Object
>
args
=
new
ArrayList
<
Object
>();
List
<
String
>
strs
=
new
ArrayList
<
String
>();
args
.
add
(
user_id
);
if
(
start_time
!=
null
)
{
if
(
push_date
!=
null
)
{
strs
.
add
(
"allot.push_time >= ?"
);
args
.
add
(
start_time
);
}
if
(
end_time
!=
null
)
{
strs
.
add
(
"allot.push_time < ?"
);
args
.
add
(
DateUtil
.
day
(
end_time
,
1
));
args
.
add
(
DateUtil
.
start
(
push_date
));
args
.
add
(
DateUtil
.
end
(
DateUtil
.
start
(
push_date
)));
}
if
(
film_type_name
!=
null
&&
film_type_name
.
trim
().
length
()
>
0
)
{
strs
.
add
(
"film.film_type_name = ?"
);
...
...
@@ -81,21 +79,18 @@ public class UserReviewServiceImpl implements UserReviewService {
public
List
<
Map
<
String
,
Object
>>
limitUnviewList
(
Long
user_id
,
Page
page
,
Date
start_time
,
Date
end_time
,
Date
push_date
,
String
film_type_name
,
String
keyword
)
{
List
<
Object
>
args
=
new
ArrayList
<
Object
>();
List
<
String
>
strs
=
new
ArrayList
<
String
>();
args
.
add
(
user_id
);
if
(
start_tim
e
!=
null
)
{
if
(
push_dat
e
!=
null
)
{
strs
.
add
(
"allot.push_time >= ?"
);
args
.
add
(
start_time
);
}
if
(
end_time
!=
null
)
{
strs
.
add
(
"allot.push_time < ?"
);
args
.
add
(
DateUtil
.
day
(
end_time
,
1
));
args
.
add
(
DateUtil
.
start
(
push_date
));
args
.
add
(
DateUtil
.
end
(
DateUtil
.
start
(
push_date
)));
}
if
(
film_type_name
!=
null
&&
film_type_name
.
trim
().
length
()
>
0
)
{
strs
.
add
(
"film.film_type_name = ?"
);
...
...
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