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
5dec4d52
Commit
5dec4d52
authored
Feb 19, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
9580d52d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
0 deletions
+40
-0
FilmService.java
src/main/java/com/egolm/film/api/service/FilmService.java
+1
-0
FilmServiceImpl.java
...java/com/egolm/film/api/service/impl/FilmServiceImpl.java
+21
-0
WebUtilController.java
.../java/com/egolm/film/api/web/admin/WebUtilController.java
+18
-0
No files found.
src/main/java/com/egolm/film/api/service/FilmService.java
View file @
5dec4d52
...
...
@@ -150,4 +150,5 @@ public interface FilmService {
void
exchangeFilmNo
(
Integer
id1
,
Integer
id2
);
void
initKeywords
(
Long
member_film_id
);
}
src/main/java/com/egolm/film/api/service/impl/FilmServiceImpl.java
View file @
5dec4d52
...
...
@@ -607,5 +607,26 @@ public class FilmServiceImpl implements FilmService {
jdbcTemplate
.
batchUpdate
(
"delete from fc_review where id = ?"
,
new
Object
[][]{{
id1
},
{
id2
}});
}
@Override
public
void
initKeywords
(
Long
member_film_id
)
{
Fc_member_film
film
=
this
.
queryMemberFilmById
(
member_film_id
);
List
<
Fc_member_film_playactor
>
playactors
=
this
.
queryMemberFilmPlayactorList
(
member_film_id
);
List
<
String
>
strs
=
new
ArrayList
<
String
>();
if
(
film
.
getFilm_no
()
!=
null
)
{
strs
.
add
(
StringUtil
.
formatLength
(
film
.
getFilm_no
(),
"0000"
));
}
if
(
StringUtil
.
isNotBlank
(
film
.
getEn_name
()))
{
strs
.
add
(
film
.
getEn_name
());
}
if
(
StringUtil
.
isNotBlank
(
film
.
getCn_name
()))
{
strs
.
add
(
film
.
getCn_name
());
}
for
(
Fc_member_film_playactor
playactor
:
playactors
)
{
if
(
playactor
.
getPlayactor_type
()
!=
null
&&
playactor
.
getPlayactor_type
().
equals
(
"director"
))
{
strs
.
add
(
playactor
.
getPlayactor_name
());
}
}
}
}
src/main/java/com/egolm/film/api/web/admin/WebUtilController.java
View file @
5dec4d52
...
...
@@ -22,7 +22,9 @@ import com.egolm.common.StringUtil;
import
com.egolm.common.Util
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.film.api.service.AdminTokenService
;
import
com.egolm.film.api.service.FilmService
;
import
com.egolm.film.api.service.ReviewService
;
import
com.egolm.film.bean.Fc_admin
;
import
com.egolm.film.bean.Fc_logs_ext
;
...
...
@@ -48,6 +50,9 @@ public class WebUtilController {
@Autowired
ReviewService
service
;
@Autowired
FilmService
filmService
;
@Autowired
AdminTokenService
tokenService
;
...
...
@@ -193,4 +198,17 @@ public class WebUtilController {
return
Rjx
.
jsonOk
();
}
@ResponseBody
@Transactional
@PostMapping
(
"initKeywords"
)
@ApiOperation
(
"初始化模糊查询关键字"
)
public
Object
initKeywords
()
{
this
.
verifyAuth
();
List
<
Map
<
String
,
Object
>>
list
=
jdbcTemplate
.
limitAll
(
"select id from fc_member_film"
,
new
Page
(
1L
,
1000L
,
"id desc"
));
for
(
Map
<
String
,
Object
>
map
:
list
)
{
filmService
.
initKeywords
(((
Number
)
map
.
get
(
"id"
)).
longValue
());
}
return
Rjx
.
jsonOk
();
}
}
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