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
841545f0
Commit
841545f0
authored
Nov 24, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xx
parent
dfdc1a56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
2 deletions
+55
-2
FilmServiceImpl.java
...java/com/egolm/film/api/service/impl/FilmServiceImpl.java
+55
-2
No files found.
src/main/java/com/egolm/film/api/service/impl/FilmServiceImpl.java
View file @
841545f0
...
...
@@ -24,6 +24,7 @@ import com.egolm.film.api.service.Messages;
import
com.egolm.film.bean.Fc_member_film
;
import
com.egolm.film.bean.Fc_member_film_all
;
import
com.egolm.film.bean.Fc_member_film_enroll
;
import
com.egolm.film.bean.Fc_member_film_enroll_ext
;
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
;
...
...
@@ -135,6 +136,7 @@ public class FilmServiceImpl implements FilmService {
}
@Override
@Transactional
public
void
saveMemberFilmBase
(
Integer
member_id
,
Long
member_film_id
,
...
...
@@ -144,8 +146,24 @@ public class FilmServiceImpl implements FilmService {
String
intro
)
{
Long
last_modify_time
=
System
.
currentTimeMillis
()/
1000
;
String
sql
=
"update fc_member_film set enroll_type_name_other = ?, cn_name = ?, en_name = ?, intro = ?, last_modify_time = ? where member_id = ? and id = ?"
;
String
str
=
StringUtil
.
join
(
","
,
""
,
""
,
""
,
enroll_type_name_other
);
Object
[]
args
=
new
Object
[]{
str
,
cn_name
,
en_name
,
intro
,
last_modify_time
,
member_id
,
member_film_id
};
String
string
=
StringUtil
.
join
(
","
,
""
,
""
,
""
,
enroll_type_name_other
);
Object
[]
args
=
new
Object
[]{
string
,
cn_name
,
en_name
,
intro
,
last_modify_time
,
member_id
,
member_film_id
};
List
<
Fc_member_film_enroll_ext
>
exts
=
new
ArrayList
<
Fc_member_film_enroll_ext
>();
if
(
enroll_type_name_other
!=
null
&&
enroll_type_name_other
.
length
>
0
)
{
for
(
String
str
:
enroll_type_name_other
)
{
if
(
str
!=
null
&&
str
.
matches
(
"\\d+"
))
{
Fc_member_film_enroll_ext
ext
=
new
Fc_member_film_enroll_ext
();
ext
.
setEnroll_type_ext_id
(
Integer
.
valueOf
(
str
));
ext
.
setFilm_id
(
member_film_id
.
intValue
());
exts
.
add
(
ext
);
}
}
}
jdbcTemplate
.
executeUpdate
(
"delete from fc_member_film_enroll_ext where film_id = ?"
,
member_film_id
.
intValue
());
jdbcTemplate
.
batchSave
(
exts
);
jdbcTemplate
.
executeUpdate
(
sql
,
args
);
}
...
...
@@ -424,7 +442,42 @@ public class FilmServiceImpl implements FilmService {
}
@Override
@Transactional
public
void
updateFilmBase
(
Fc_member_film_base_model
filmBase
)
{
String
enroll_type_name_other
=
filmBase
.
getEnroll_type_name_other
();
List
<
Fc_member_film_enroll_ext
>
exts
=
new
ArrayList
<
Fc_member_film_enroll_ext
>();
if
(
enroll_type_name_other
!=
null
)
{
String
[]
strs
=
enroll_type_name_other
.
split
(
","
);
if
(
strs
!=
null
&&
strs
.
length
>
0
)
{
for
(
String
str
:
strs
)
{
if
(
str
!=
null
&&
str
.
matches
(
"\\d+"
))
{
Fc_member_film_enroll_ext
ext
=
new
Fc_member_film_enroll_ext
();
ext
.
setEnroll_type_ext_id
(
Integer
.
valueOf
(
str
));
ext
.
setFilm_id
(
filmBase
.
getMember_film_id
().
intValue
());
exts
.
add
(
ext
);
}
}
}
}
String
enroll_type_name
=
filmBase
.
getEnroll_type_name
();
List
<
Fc_member_film_enroll
>
enrolls
=
new
ArrayList
<
Fc_member_film_enroll
>();
if
(
enroll_type_name
!=
null
)
{
String
[]
strs
=
enroll_type_name
.
split
(
","
);
if
(
strs
!=
null
&&
strs
.
length
>
0
)
{
for
(
String
str
:
strs
)
{
if
(
str
!=
null
&&
str
.
matches
(
"\\d+"
))
{
Fc_member_film_enroll
enroll
=
new
Fc_member_film_enroll
();
enroll
.
setEnroll_type_id
(
Integer
.
valueOf
(
str
));
enroll
.
setFilm_id
(
filmBase
.
getMember_film_id
().
intValue
());
enrolls
.
add
(
enroll
);
}
}
}
}
jdbcTemplate
.
executeUpdate
(
"delete from fc_member_film_enroll where film_id = ?"
,
filmBase
.
getMember_film_id
());
jdbcTemplate
.
executeUpdate
(
"delete from fc_member_film_enroll_ext where film_id = ?"
,
filmBase
.
getMember_film_id
());
jdbcTemplate
.
batchSave
(
enrolls
);
jdbcTemplate
.
batchSave
(
exts
);
jdbcTemplate
.
update
(
filmBase
);
}
...
...
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