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
b40e1d81
Commit
b40e1d81
authored
Apr 25, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
c37d3cfc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
CinemaService.java
src/main/java/com/egolm/film/api/service/CinemaService.java
+1
-1
CinemaServiceImpl.java
...va/com/egolm/film/api/service/impl/CinemaServiceImpl.java
+4
-6
CinemaController.java
...n/java/com/egolm/film/api/web/admin/CinemaController.java
+6
-1
No files found.
src/main/java/com/egolm/film/api/service/CinemaService.java
View file @
b40e1d81
...
...
@@ -12,7 +12,7 @@ public interface CinemaService {
List
<
Map
<
String
,
Object
>>
getCinemaList
(
String
keyword
,
Page
page
);
void
setTmpData
(
Integer
showtime
Id
);
void
setTmpData
(
Integer
cinema
Id
);
List
<
Map
<
String
,
Object
>>
queryShowtimeList
(
Integer
cinemaId
);
...
...
src/main/java/com/egolm/film/api/service/impl/CinemaServiceImpl.java
View file @
b40e1d81
...
...
@@ -52,14 +52,12 @@ public class CinemaServiceImpl implements CinemaService {
}
@Override
public
void
setTmpData
(
Integer
showtimeId
)
{
String
sql
=
"select cinema_id from fc_cinema_showtime where id = ?"
;
Integer
cinema_id
=
jdbcTemplate
.
queryForInt
(
sql
,
showtimeId
);
public
void
setTmpData
(
Integer
cinemaId
)
{
String
sql_tmp_count_show
=
"select count(*) from fc_cinema_showtime where cinema_id = ? and showtime_no is not null and showtime_no != '' and status = 0"
;
Integer
tmp_count_show
=
jdbcTemplate
.
queryForInt
(
sql_tmp_count_show
,
cinema
_i
d
);
Integer
tmp_count_show
=
jdbcTemplate
.
queryForInt
(
sql_tmp_count_show
,
cinema
I
d
);
String
sql_tmp_count_film
=
"select count(film_id) from fc_cinema_showtime where cinema_id = ? and film_id is not null and status = 0 group by film_id"
;
Integer
tmp_count_film
=
jdbcTemplate
.
queryForInt
(
sql_tmp_count_film
,
cinema
_i
d
);
jdbcTemplate
.
executeUpdate
(
"update fc_cinema set tmp_count_show = ?, tmp_count_film = ? where id = ?"
,
tmp_count_show
,
tmp_count_film
,
cinema
_i
d
);
Integer
tmp_count_film
=
jdbcTemplate
.
queryForInt
(
sql_tmp_count_film
,
cinema
I
d
);
jdbcTemplate
.
executeUpdate
(
"update fc_cinema set tmp_count_show = ?, tmp_count_film = ? where id = ?"
,
tmp_count_show
,
tmp_count_film
,
cinema
I
d
);
}
@Override
...
...
src/main/java/com/egolm/film/api/web/admin/CinemaController.java
View file @
b40e1d81
...
...
@@ -116,7 +116,8 @@ public class CinemaController {
@ApiOperation
(
"保存场次信息"
)
public
Object
updateShowtime
(
Fc_cinema_showtime_model
showtimeModel
)
{
common
.
update
(
showtimeModel
);
service
.
setTmpData
(
showtimeModel
.
getId
());
Fc_cinema_showtime
showtime
=
common
.
queryById
(
showtimeModel
.
getId
(),
Fc_cinema_showtime
.
class
);
service
.
setTmpData
(
showtime
.
getCinema_id
());
return
Rjx
.
jsonOk
();
}
...
...
@@ -158,6 +159,7 @@ public class CinemaController {
@ApiOperation
(
"删除排片时间(按播放时间彻底删除)"
)
public
Object
deleteShowtimeByShowtime
(
Integer
cinema_id
,
String
show_time
)
{
service
.
deleteShowtimeByShowtime
(
cinema_id
,
show_time
);
service
.
setTmpData
(
cinema_id
);
return
Rjx
.
jsonOk
();
}
...
...
@@ -166,6 +168,7 @@ public class CinemaController {
@ApiOperation
(
"删除排片时间(按播放日期彻底删除)"
)
public
Object
deleteShowtimeByShowdate
(
Integer
cinema_id
,
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
Date
show_date
)
{
service
.
deleteShowtimeByShowdate
(
cinema_id
,
show_date
);
service
.
setTmpData
(
cinema_id
);
return
Rjx
.
jsonOk
();
}
...
...
@@ -174,6 +177,8 @@ public class CinemaController {
@ApiOperation
(
"删除单个场次(逻辑删除)"
)
public
Object
deleteShowtimeById
(
Integer
id
)
{
service
.
deleteShowtimeById
(
id
);
Fc_cinema_showtime
showtime
=
common
.
queryById
(
id
,
Fc_cinema_showtime
.
class
);
service
.
setTmpData
(
showtime
.
getCinema_id
());
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