Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
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
曲欣亮
sentinel
Commits
20fed425
Commit
20fed425
authored
Jan 22, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
7998ed38
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
4 deletions
+73
-4
ReviewService.java
src/main/java/com/egolm/film/api/service/ReviewService.java
+3
-0
ReviewServiceImpl.java
...va/com/egolm/film/api/service/impl/ReviewServiceImpl.java
+44
-0
AdminReviewController.java
...a/com/egolm/film/api/web/admin/AdminReviewController.java
+14
-1
AdminUserController.java
...ava/com/egolm/film/api/web/admin/AdminUserController.java
+4
-2
SqlWhere.java
src/main/java/com/egolm/film/util/SqlWhere.java
+8
-1
No files found.
src/main/java/com/egolm/film/api/service/ReviewService.java
View file @
20fed425
...
...
@@ -112,4 +112,7 @@ public interface ReviewService {
List
<
Map
<
String
,
Object
>>
queryReviewHistoryList
(
List
<
Integer
>
types
,
Page
page
);
List
<
Map
<
String
,
Object
>>
queryExhibitionList
(
String
keyword
,
Integer
enroll_type_id
,
Integer
film_type_name
,
Integer
film_type_name_short
,
String
film_country
,
Integer
from_round
,
Page
page
);
}
\ No newline at end of file
src/main/java/com/egolm/film/api/service/impl/ReviewServiceImpl.java
View file @
20fed425
...
...
@@ -726,5 +726,49 @@ public class ReviewServiceImpl implements ReviewService {
sql
=
"select t.* from ("
+
sql
+
") t where t.film_type_name in ("
+
StringUtil
.
join
(
"', '"
,
"'"
,
"'"
,
names
)
+
")"
;
return
jdbcTemplate
.
limit
(
sql
,
page
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryExhibitionList
(
String
keyword
,
Integer
enroll_type_id
,
Integer
film_type_name
,
Integer
film_type_name_short
,
String
film_country
,
Integer
from_round
,
Page
page
)
{
String
sql_film
=
"fc_member_film"
;
if
(
StringUtil
.
isNotBlank
(
enroll_type_id
))
{
sql_film
=
"(select mf0.* from fc_member_film mf0, fc_member_film_enroll mfe where mf0.id = mfe.film_id and mfe.enroll_type_id = "
+
enroll_type_id
+
")"
;
}
String
sql
=
""
+
"select "
+
"r.*, "
+
"mf.id film_id_enroll, "
+
"mf.cn_name, "
+
"mf.en_name, "
+
"mf.enroll_type_name, "
+
"mf.film_type_name, "
+
"mf.film_country, "
+
"mf.director, "
+
"mf.film_total_time, "
+
"mf.completion_date, "
+
"mf.play_shanghai, "
+
"rh.review_round state_3_round, "
+
"(select count(fp.id) from fc_member_film_playactor fp where fp.film_id = mf.id and fp.playactor_type = 'director') director_name "
+
"from "
+
"fc_review r "
+
"left join ("
+
sql_film
+
") mf on mf.id = r.film_id "
+
"left join fc_review_history rh on rh.enroll_type_id != 4 and rh.review_state = 3 and rh.review_id = r.id "
+
""
;
SqlWhere
where
=
new
SqlWhere
()
.
nn
(
"t.film_id_enroll"
)
.
lk
(
new
String
[]
{
"cn_name"
,
"en_name"
,
"director_name"
},
keyword
)
.
eq
(
"film_type_name"
,
film_type_name
)
.
eq
(
"film_type_name_short"
,
film_type_name_short
)
.
eq
(
"film_country"
,
film_country
)
;
if
(
from_round
!=
null
)
{
if
(
from_round
==
0
)
{
where
.
where
(
"t.state_3_round is null"
);
}
else
{
where
.
eq
(
"state_3_round"
,
from_round
);
}
}
sql
=
"select t.* from ("
+
sql
+
") t "
+
StringUtil
.
join
(
" and "
,
" where "
,
""
,
where
.
getStringList
())
+
" order by t.film_id desc"
;
return
jdbcTemplate
.
limit
(
sql
,
page
,
where
.
getObjectArray
());
}
}
\ No newline at end of file
src/main/java/com/egolm/film/api/web/admin/AdminReviewController.java
View file @
20fed425
...
...
@@ -172,15 +172,28 @@ public class AdminReviewController {
@PostMapping
({
"getExhibitionList"
})
@ApiOperation
(
"查询展映榜单"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
name
=
"keyword"
,
value
=
"搜索关键字"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
name
=
"enroll_type_id"
,
value
=
"搜索关键字"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
name
=
"film_type_name"
,
value
=
"搜索关键字"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
name
=
"film_type_name_short"
,
value
=
"搜索关键字"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
name
=
"film_country"
,
value
=
"搜索关键字"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
name
=
"from_round"
,
value
=
"影片来源 0原始申报 2二选参展, 3三选参展 5 选片参展"
),
})
public
Object
getExhibitionList
(
String
keyword
,
Integer
enroll_type_id
,
Integer
film_type_name
,
Integer
film_type_name_short
,
String
film_country
,
Integer
from_round
,
Long
index
,
Long
limit
)
{
index
=
index
==
null
?
1
:
index
;
limit
=
limit
==
null
?
20
:
limit
;
Page
page
=
new
Page
(
index
,
limit
);
return
Rjx
.
jsonOk
().
setPage
(
page
);
List
<
Map
<
String
,
Object
>>
list
=
reviewService
.
queryExhibitionList
(
keyword
,
enroll_type_id
,
film_type_name
,
film_type_name_short
,
film_country
,
from_round
,
page
);
return
Rjx
.
jsonOk
().
setData
(
list
).
setPage
(
page
);
}
@ResponseBody
...
...
src/main/java/com/egolm/film/api/web/admin/AdminUserController.java
View file @
20fed425
...
...
@@ -157,9 +157,11 @@ public class AdminUserController {
user
.
setSalt
(
salt
);
user
.
setPassword
(
encodePassword
);
service
.
saveUser
(
user
);
}
else
if
(
StringUtil
.
isNotBlank
(
password
))
{
}
else
{
service
.
updateUserInfo
(
user
);
service
.
changePassword
(
user
.
getUid
(),
password
);
if
(
StringUtil
.
isNotBlank
(
password
))
{
service
.
changePassword
(
user
.
getUid
(),
password
);
}
}
return
Rjx
.
jsonOk
().
setData
(
user
);
}
...
...
src/main/java/com/egolm/film/util/SqlWhere.java
View file @
20fed425
...
...
@@ -15,7 +15,7 @@ public class SqlWhere {
this
.
objList
=
new
ArrayList
<
Object
>();
}
public
SqlWhere
where
(
String
where
,
Object
[]
obj
)
{
public
SqlWhere
where
(
String
where
,
Object
...
obj
)
{
if
(
StringUtil
.
isNotBlank
(
where
))
{
this
.
strList
.
add
(
where
);
if
(
obj
!=
null
){
...
...
@@ -27,6 +27,13 @@ public class SqlWhere {
return
this
;
}
public
SqlWhere
nn
(
String
name
)
{
if
(
StringUtil
.
isNotBlank
(
name
))
{
this
.
strList
.
add
(
name
+
" is not null"
);
}
return
this
;
}
public
SqlWhere
eq
(
String
name
,
Object
obj
)
{
if
(
StringUtil
.
isNotBlank
(
obj
))
{
this
.
strList
.
add
(
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