记得上下班打卡 | 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
da3ba705
Commit
da3ba705
authored
Jun 25, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
8de85c9c
e497aee9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
50 deletions
+63
-50
KylinPerformancesMapper.xml
...iquidnet.service.kylin.mapper/KylinPerformancesMapper.xml
+63
-50
No files found.
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/resources/com.liquidnet.service.kylin.mapper/KylinPerformancesMapper.xml
View file @
da3ba705
...
@@ -385,56 +385,69 @@
...
@@ -385,56 +385,69 @@
<!-- 演出订单统计-->
<!-- 演出订单统计-->
<select
id=
"getPerformanceOrderStatisticalList"
parameterType=
"java.lang.String"
<select
id=
"getPerformanceOrderStatisticalList"
parameterType=
"java.lang.String"
resultMap=
"performanceOrderStatisticalDaoResult"
>
resultMap=
"performanceOrderStatisticalDaoResult"
>
SELECT kp.performances_id,
SELECT
kt.tickets_id,
kp.performances_id ,
kt.title,
kt.tickets_id,
kt.price,
kt.title,
kt.type,
kt.price,
kt.use_start,
kt.type,
IFNULL(kts.total_general, 0) AS 'total_general',
kt.use_start,
IFNULL(ot.total_sale_general, 0) AS 'sale_general',
IFNULL(kts.total_general , 0) AS 'total_general' ,
IFNULL((kts.total_general - ot.total_sale_general), 0) AS 'surplus_general',
IFNULL(ot.total_sale_general , 0) AS 'sale_general' ,
IFNULL(ot.total_sale_price, 0) AS 'total_sale_price',
IFNULL((kts.total_general - ot.total_sale_general),0) AS 'surplus_general',
IFNULL(kts.total_exchange, 0) AS 'total_exchange',
IFNULL(ot.total_sale_price , 0) AS 'total_sale_price' ,
IFNULL(ot.total_refund_general, 0) AS 'total_refund_general',
IFNULL(kts.total_exchange , 0) AS 'total_exchange',
IFNULL(ot.total_refund_price, 0) AS 'total_refund_price',
IFNULL(ot.total_refund_general , 0) AS 'total_refund_general',
IFNULL(ot.total_member_number, 0) AS 'total_member_number',
IFNULL(ot.total_refund_price , 0) AS 'total_refund_price',
IFNULL(ot.total_paying_number, 0) AS 'total_paying_number',
IFNULL(ot.total_member_number , 0) AS 'total_member_number',
IFNULL(ut.total_buy_users, 0) AS 'total_buy_users'
IFNULL(otp.total_paying_number , 1) AS 'total_paying_number',
FROM (select t.performances_id from kylin_performances t where t.performances_id = ${performancesId}) AS kp
IFNULL(ut.total_buy_users , 0) AS 'total_buy_users'
inner JOIN(
FROM
SELECT kotr.performance_id AS 'performance_id',
(select t.performances_id from kylin_performances t where t.performances_id = ${performancesId}) AS kp
kotr.ticket_id,
inner JOIN(
(sum(kot.number) - sum(kot.refund_number)) AS 'total_sale_general',
SELECT
(sum(kot.price_actual) - sum(kot.price_refund)) AS 'total_sale_price',
kotr.performance_id AS 'performance_id',
sum(kot.refund_number) as 'total_refund_general',
kotr.ticket_id,
sum(kot.price_refund) as 'total_refund_price',
(sum(kot.number)- sum(kot.refund_number)) AS 'total_sale_general' ,
sum(case when kotr.is_member = 1 then kot.number else 0 end) total_member_number,
(sum(kot.price_actual) - sum(kot.price_refund)) AS 'total_sale_price',
sum(case when kots.`status` = 0 then kot.number else 0 end) total_paying_number
sum(kot.refund_number) as 'total_refund_general',
FROM kylin_order_ticket_relations kotr
sum(kot.price_refund) as 'total_refund_price',
inner join kylin_order_tickets AS kot on kotr.order_id = kot.order_tickets_id
sum(case when kotr.is_member = 1 then kot.number else 0 end) total_member_number
inner JOIN kylin_order_ticket_status AS kots ON kots.order_id = kot.order_tickets_id
FROM
WHERE 1 > 0
kylin_order_ticket_relations kotr
and kotr.performance_id = ${performancesId}
inner join kylin_order_tickets AS kot on kotr.order_id = kot.order_tickets_id
and kots.`status` in (1, 3, 4)
inner JOIN kylin_order_ticket_status AS kots ON kots.order_id = kot.order_tickets_id
and kot.coupon_type = 'no'
WHERE 1>0 and kotr.performance_id = ${performancesId}
group by kotr.performance_id, kotr.ticket_id
and kots.`status` in(1,3,4) and kot.coupon_type ='no'
) AS ot ON ot.performance_id = kp.performances_id
group by kotr.performance_id,kotr.ticket_id
inner join kylin_tickets kt on kt.tickets_id = ot.ticket_id
) AS ot ON ot.performance_id = kp.performances_id
inner join kylin_ticket_status kts on kts.ticket_id = kt.tickets_id
left JOIN(
inner JOIN(
SELECT
select t.performance_id, count(t.user_id) as 'total_buy_users'
kotr.performance_id,kotr.ticket_id,
from (
sum(ifnull(kot.number,0)) total_paying_number
SELECT kotr.performance_id,
FROM
kot.user_id
kylin_order_ticket_relations kotr
FROM kylin_order_ticket_relations kotr
inner join kylin_order_tickets AS kot on kotr.order_id = kot.order_tickets_id
inner join kylin_order_tickets AS kot on kotr.order_id = kot.order_tickets_id
inner JOIN kylin_order_ticket_status AS kots ON kots.order_id = kot.order_tickets_id
inner JOIN kylin_order_ticket_status AS kots ON kots.order_id = kot.order_tickets_id
WHERE 1>0 and kotr.performance_id = ${performancesId}
WHERE kotr.performance_id = ${performancesId}
and kots.`status` = 0 and kot.coupon_type ='no'
and (kots.`status` = 0 OR kots.`status` = 1)
group by kotr.performance_id,kotr.ticket_id
group by kotr.performance_id, kot.user_id
) AS otp ON otp.performance_id = kp.performances_id
) t
inner join kylin_tickets kt on kt.tickets_id = ot.ticket_id
) AS ut ON ut.performance_id = kp.performances_id
inner join kylin_ticket_status kts on kts.ticket_id = kt.tickets_id
inner JOIN(
select t.performance_id,count(t.user_id) as 'total_buy_users' from(
SELECT
kotr.performance_id,
kot.user_id
FROM
kylin_order_ticket_relations kotr
inner join kylin_order_tickets AS kot on kotr.order_id = kot.order_tickets_id
inner JOIN kylin_order_ticket_status AS kots ON kots.order_id = kot.order_tickets_id
WHERE kotr.performance_id = ${performancesId} and (kots.`status` = 0 OR kots.`status` = 1)
group by kotr.performance_id,kot.user_id
) t
) AS ut ON ut.performance_id = kp.performances_id
</select>
</select>
<select
id=
"getPerformanceSponsorList"
resultMap=
"performanceSponsorDaoResult"
>
<select
id=
"getPerformanceSponsorList"
resultMap=
"performanceSponsorDaoResult"
>
select distinct kp.sponsor_id, kp.sponsor, kp.sponsor_type
select distinct kp.sponsor_id, kp.sponsor, kp.sponsor_type
...
...
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