选座用的库存下单接口中入餐数据

select
Distinct
BB.id AS BizSeatPlanID,
BB.biz_show_id AS BizShowID,
BB.biz_show_session_id AS BizShowSession,
AA.id as ticketChannelId,
CC.zone_concrete_id as zoneConcreteId,
CC.id as ticketSeatId,
concat(CC.logical_row,'排',CC.logical_column,'座') as ticketSeatDesc
from ticket_center.ticket_seat CC
join ticket_center.ticket DD ON DD.sector_concrete_id =CC.sector_concrete_id and DD.zone_concrete_id =CC.zone_concrete_id
JOIN show_center.biz_seat_plan BB on BB.std_seat_plan_id = DD.seat_plan_id
JOIN ticket_center. ticket_channel_item AA on AA.ticket_id = DD.id and AA.ticket_id =cc.ticket_id
where CC.show_id = '5f9ab17902bd280c6b28d7d3'
#AND AA.id='5f9ab4f03cf3f06909f2a8f8'
#and CC.ID= '5f9ab4f03cf3f06909f2a89a'
#and CC.id = '5f9ab4f03cf3f06909f2a84a'
AND BB.biz_code='PXQ'
AND DD.biz_code ='PXQ_M'
AND AA.biz_code ='PXQ';

 

 

select 
Distinct
BB.id AS BizSeatPlanID,
BB.biz_show_id AS BizShowID,
BB.biz_show_session_id AS BizShowSession, 
AA.id as ticketChannelId,
CC.zone_concrete_id as zoneConcreteId,
CC.id as ticketSeatId,
concat(CC.logical_row,'',CC.logical_column,'') as ticketSeatDesc
from ticket_center.ticket_seat CC
join ticket_center.ticket DD ON DD.sector_concrete_id =CC.sector_concrete_id and DD.zone_concrete_id =CC.zone_concrete_id
JOIN show_center.biz_seat_plan BB on BB.std_seat_plan_id = DD.seat_plan_id
JOIN ticket_center. ticket_channel_item AA on AA.ticket_id = DD.id and AA.ticket_id =cc.ticket_id
where CC.show_id  = '5f9ab17902bd280c6b28d7d3'  
#AND AA.id='5f9ab4f03cf3f06909f2a8f8'
#and CC.ID= '5f9ab4f03cf3f06909f2a89a'
#and CC.id = '5f9ab4f03cf3f06909f2a84a'
AND BB.biz_code='PXQ' 
AND DD.biz_code ='PXQ_M'
AND AA.biz_code ='PXQ';

 

posted @ 2020-10-29 21:43  巴黎爱工作  阅读(171)  评论(0编辑  收藏  举报