记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
3e5ed7f9
Commit
3e5ed7f9
authored
Mar 22, 2022
by
GaoHu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exit
parent
e7400dda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
SmileShowServiceImpl.java
...min/zhengzai/smile/service/impl/SmileShowServiceImpl.java
+9
-12
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/smile/service/impl/SmileShowServiceImpl.java
View file @
3e5ed7f9
...
...
@@ -69,9 +69,9 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
public
List
<
ShowVo
>
listShow
(
SmileShowParam
smileShowParam
)
{
PageInfo
<
KylinPerformances
>
pageInfo
;
//查询所有代理的演出id
List
<
KylinPerformances
>
kylinPerformancesList
=
kylinPerformancesMapper
.
selectPerIdByAgent
();
List
<
KylinPerformances
>
kylinPerformancesList
=
kylinPerformancesMapper
.
selectPerIdByAgent
();
List
<
ShowVo
>
collect
=
kylinPerformancesList
.
stream
().
map
(
kylinPerformances
->
{
return
kylinPerformancesList
.
stream
().
map
(
kylinPerformances
->
{
ShowVo
vo
=
new
ShowVo
();
//演出id
vo
.
setPerformancesId
(
kylinPerformances
.
getPerformancesId
());
...
...
@@ -84,9 +84,9 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
Integer
open
=
0
;
BigDecimal
totalAmount
=
BigDecimal
.
valueOf
(
0
);
for
(
KylinOrderTickets
kylinOrderTickets
:
kylinOrderTicketsList
)
{
for
(
KylinOrderTickets
kylinOrderTickets
:
kylinOrderTicketsList
)
{
//演出张数
open
+=
(
kylinOrderTickets
.
getNumber
()
-
kylinOrderTickets
.
getRefundNumber
());
open
+=
(
kylinOrderTickets
.
getNumber
()
-
kylinOrderTickets
.
getRefundNumber
());
//总销售金额
totalAmount
=
totalAmount
.
add
(
kylinOrderTickets
.
getPriceActual
()).
subtract
(
kylinOrderTickets
.
getPriceRefund
());
}
...
...
@@ -97,29 +97,26 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
return
vo
;
}).
collect
(
Collectors
.
toList
());
return
null
;
}
@Override
public
AjaxResult
sort
(
ShowSort
showSort
)
{
//查询数据库是否又该顺序的演出
kylinPerformancesMapper
.
updateComment
(
showSort
.
getSort
());
kylinPerformancesMapper
.
updateCommentByPer
(
showSort
.
getSort
(),
showSort
.
getPerformancesId
());
kylinPerformancesMapper
.
updateCommentByPer
(
showSort
.
getSort
(),
showSort
.
getPerformancesId
());
//获取排序演出id
List
<
String
>
collect
=
kylinPerformancesMapper
.
selectByComment
().
stream
().
map
(
KylinPerformances:
:
getPerformancesId
).
collect
(
Collectors
.
toList
());
String
perId
=
StringUtils
.
strip
(
collect
.
toString
(),
"[]"
);
String
perId
=
StringUtils
.
strip
(
collect
.
toString
(),
"[]"
);
smileRedisUtils
.
set
(
SmileRedisConst
.
SMILE_SHOW
,
perId
);
return
AjaxResult
.
success
();
}
@Override
public
AjaxResult
make
(
String
performancesId
)
{
if
(!
smileRedisUtils
.
hasKey
(
SmileRedisConst
.
SELL_SHOW_PAYMENT
.
concat
(
performancesId
))){
smileRedisUtils
.
set
(
SmileRedisConst
.
SELL_SHOW_PAYMENT
.
concat
(
performancesId
),
1
);
}
else
{
if
(!
smileRedisUtils
.
hasKey
(
SmileRedisConst
.
SELL_SHOW_PAYMENT
.
concat
(
performancesId
)))
{
smileRedisUtils
.
set
(
SmileRedisConst
.
SELL_SHOW_PAYMENT
.
concat
(
performancesId
),
1
);
}
else
{
smileRedisUtils
.
del
(
SmileRedisConst
.
SELL_SHOW_PAYMENT
.
concat
(
performancesId
));
}
return
AjaxResult
.
success
();
...
...
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