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
ab3a6b57
Commit
ab3a6b57
authored
Nov 28, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
3e342232
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
FilmService.java
src/main/java/com/egolm/film/api/service/FilmService.java
+2
-0
FilmServiceImpl.java
...java/com/egolm/film/api/service/impl/FilmServiceImpl.java
+16
-8
No files found.
src/main/java/com/egolm/film/api/service/FilmService.java
View file @
ab3a6b57
...
@@ -117,6 +117,8 @@ public interface FilmService {
...
@@ -117,6 +117,8 @@ public interface FilmService {
*/
*/
void
updateFilmBase
(
Fc_member_film_base_model
filmBase
);
void
updateFilmBase
(
Fc_member_film_base_model
filmBase
);
void
updateEnroll
(
Long
member_film_id
);
/**
/**
* 进入下一个审片环节
* 进入下一个审片环节
* @param member_film_id
* @param member_film_id
...
...
src/main/java/com/egolm/film/api/service/impl/FilmServiceImpl.java
View file @
ab3a6b57
...
@@ -422,6 +422,7 @@ public class FilmServiceImpl implements FilmService {
...
@@ -422,6 +422,7 @@ public class FilmServiceImpl implements FilmService {
@Override
@Override
public
void
pass
(
Long
member_film_id
)
{
public
void
pass
(
Long
member_film_id
)
{
this
.
updateEnroll
(
member_film_id
);
String
sql
=
"update fc_member_film set apply_state = ?, pass_time = ? where id = ?"
;
String
sql
=
"update fc_member_film set apply_state = ?, pass_time = ? where id = ?"
;
jdbcTemplate
.
executeUpdate
(
sql
,
2
,
System
.
currentTimeMillis
()/
1000L
,
member_film_id
);
jdbcTemplate
.
executeUpdate
(
sql
,
2
,
System
.
currentTimeMillis
()/
1000L
,
member_film_id
);
}
}
...
@@ -450,7 +451,16 @@ public class FilmServiceImpl implements FilmService {
...
@@ -450,7 +451,16 @@ public class FilmServiceImpl implements FilmService {
@Override
@Override
@Transactional
@Transactional
public
void
updateFilmBase
(
Fc_member_film_base_model
filmBase
)
{
public
void
updateFilmBase
(
Fc_member_film_base_model
filmBase
)
{
String
enroll_type_name_other
=
filmBase
.
getEnroll_type_name_other
();
this
.
updateEnroll
(
filmBase
.
getMember_film_id
());
jdbcTemplate
.
update
(
filmBase
);
}
@Override
@Transactional
public
void
updateEnroll
(
Long
member_film_id
)
{
Fc_member_film
film
=
jdbcTemplate
.
queryForBean
(
"select * from fc_member_film where id = ?"
,
Fc_member_film
.
class
,
member_film_id
);
String
enroll_type_name_other
=
film
.
getEnroll_type_name_other
();
String
enroll_type_name
=
film
.
getEnroll_type_name
();
List
<
Fc_member_film_enroll_ext
>
exts
=
new
ArrayList
<
Fc_member_film_enroll_ext
>();
List
<
Fc_member_film_enroll_ext
>
exts
=
new
ArrayList
<
Fc_member_film_enroll_ext
>();
if
(
enroll_type_name_other
!=
null
)
{
if
(
enroll_type_name_other
!=
null
)
{
String
[]
strs
=
enroll_type_name_other
.
split
(
","
);
String
[]
strs
=
enroll_type_name_other
.
split
(
","
);
...
@@ -459,13 +469,12 @@ public class FilmServiceImpl implements FilmService {
...
@@ -459,13 +469,12 @@ public class FilmServiceImpl implements FilmService {
if
(
str
!=
null
&&
str
.
matches
(
"\\d+"
))
{
if
(
str
!=
null
&&
str
.
matches
(
"\\d+"
))
{
Fc_member_film_enroll_ext
ext
=
new
Fc_member_film_enroll_ext
();
Fc_member_film_enroll_ext
ext
=
new
Fc_member_film_enroll_ext
();
ext
.
setEnroll_type_ext_id
(
Integer
.
valueOf
(
str
));
ext
.
setEnroll_type_ext_id
(
Integer
.
valueOf
(
str
));
ext
.
setFilm_id
(
filmBase
.
getMember_film_id
()
.
intValue
());
ext
.
setFilm_id
(
member_film_id
.
intValue
());
exts
.
add
(
ext
);
exts
.
add
(
ext
);
}
}
}
}
}
}
}
}
String
enroll_type_name
=
filmBase
.
getEnroll_type_name
();
List
<
Fc_member_film_enroll
>
enrolls
=
new
ArrayList
<
Fc_member_film_enroll
>();
List
<
Fc_member_film_enroll
>
enrolls
=
new
ArrayList
<
Fc_member_film_enroll
>();
if
(
enroll_type_name
!=
null
)
{
if
(
enroll_type_name
!=
null
)
{
String
[]
strs
=
enroll_type_name
.
split
(
","
);
String
[]
strs
=
enroll_type_name
.
split
(
","
);
...
@@ -474,21 +483,20 @@ public class FilmServiceImpl implements FilmService {
...
@@ -474,21 +483,20 @@ public class FilmServiceImpl implements FilmService {
if
(
str
!=
null
&&
str
.
matches
(
"\\d+"
))
{
if
(
str
!=
null
&&
str
.
matches
(
"\\d+"
))
{
Fc_member_film_enroll
enroll
=
new
Fc_member_film_enroll
();
Fc_member_film_enroll
enroll
=
new
Fc_member_film_enroll
();
enroll
.
setEnroll_type_id
(
Integer
.
valueOf
(
str
));
enroll
.
setEnroll_type_id
(
Integer
.
valueOf
(
str
));
enroll
.
setFilm_id
(
filmBase
.
getMember_film_id
()
.
intValue
());
enroll
.
setFilm_id
(
member_film_id
.
intValue
());
enrolls
.
add
(
enroll
);
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 where film_id = ?"
,
member_film_id
);
jdbcTemplate
.
executeUpdate
(
"delete from fc_member_film_enroll_ext where film_id = ?"
,
filmBase
.
getMember_film_id
()
);
jdbcTemplate
.
executeUpdate
(
"delete from fc_member_film_enroll_ext where film_id = ?"
,
member_film_id
);
if
(
enrolls
.
size
()
>
0
)
{
if
(
enrolls
.
size
()
>
0
)
{
jdbcTemplate
.
batchSave
(
enrolls
);
jdbcTemplate
.
batchSave
(
enrolls
);
}
}
if
(
exts
.
size
()
>
0
)
{
if
(
exts
.
size
()
>
0
)
{
jdbcTemplate
.
batchSave
(
exts
);
jdbcTemplate
.
batchSave
(
exts
);
}
}
jdbcTemplate
.
update
(
filmBase
);
}
}
@Override
@Override
...
...
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