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
ebbf4d01
Commit
ebbf4d01
authored
Apr 26, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
ef7bbd29
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
CinemaServiceImpl.java
...va/com/egolm/film/api/service/impl/CinemaServiceImpl.java
+3
-5
CinemaController.java
...n/java/com/egolm/film/api/web/admin/CinemaController.java
+3
-4
No files found.
src/main/java/com/egolm/film/api/service/impl/CinemaServiceImpl.java
View file @
ebbf4d01
...
...
@@ -110,14 +110,12 @@ public class CinemaServiceImpl implements CinemaService {
public
void
setShowtimeNo
(
Integer
showtimeId
)
{
Fc_cinema_showtime
showtime
=
common
.
queryById
(
showtimeId
,
Fc_cinema_showtime
.
class
);
if
(
showtime
.
getShowtime_no
()
==
null
)
{
Integer
max_showtime_no
=
this
.
queryMaxShowtimeNoByCinemaId
(
showtimeId
);
Integer
nextNo
=
null
;
Integer
max_showtime_no
=
this
.
queryMaxShowtimeNoByCinemaId
(
showtime
.
getCinema_id
());
if
(
max_showtime_no
==
null
)
{
Fc_cinema
cinema
=
common
.
queryById
(
showtime
.
getCinema_id
(),
Fc_cinema
.
class
);
nextNo
=
Integer
.
valueOf
(
cinema
.
getCinema_no
())
*
10000
;
}
else
{
nextNo
=
max_showtime_no
+
1
;
max_showtime_no
=
Integer
.
valueOf
(
cinema
.
getCinema_no
())
*
10000
;
}
Integer
nextNo
=
max_showtime_no
+
1
;
jdbcTemplate
.
executeUpdate
(
"update fc_cinema_showtime set showtime_no = ? where id = ?"
,
nextNo
,
showtimeId
);
}
}
...
...
src/main/java/com/egolm/film/api/web/admin/CinemaController.java
View file @
ebbf4d01
...
...
@@ -125,9 +125,8 @@ public class CinemaController {
Fc_cinema
cinema
=
common
.
queryById
(
cinema_id
,
Fc_cinema
.
class
);
String
cinema_no
=
cinema
.
getCinema_no
();
Integer
max_showtime_no
=
service
.
queryMaxShowtimeNoByCinemaId
(
cinema_id
);
Integer
nextShowtimeNo
=
Integer
.
valueOf
(
cinema_no
)
*
10000
;
if
(
max_showtime_no
!=
null
)
{
nextShowtimeNo
=
max_showtime_no
+
1
;
if
(
max_showtime_no
==
null
)
{
max_showtime_no
=
Integer
.
valueOf
(
cinema_no
)
*
10000
;
}
List
<
Object
>
list
=
new
ArrayList
<
Object
>();
for
(
Date
date
:
show_date
)
{
...
...
@@ -141,7 +140,7 @@ public class CinemaController {
showtime
.
setTicket_price
(
new
BigDecimal
(
ticket_price
));
showtime
.
setIs_important
(
is_important
);
if
(
StringUtil
.
isNotBlank
(
ticket_price
)
||
is_important
!=
null
)
{
showtime
.
setShowtime_no
(
nextShowtimeNo
++
);
showtime
.
setShowtime_no
(
++
max_showtime_no
);
}
list
.
add
(
showtime
);
}
...
...
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