排号人数统计修改
This commit is contained in:
@@ -52,6 +52,7 @@
|
|||||||
and c.shop_id=a.shop_id -- 同一张桌子
|
and c.shop_id=a.shop_id -- 同一张桌子
|
||||||
AND c.create_time < a.create_time -- 在当前用户之前排队
|
AND c.create_time < a.create_time -- 在当前用户之前排队
|
||||||
AND c.state IN (0, 1) -- 排队中或等待中的人
|
AND c.state IN (0, 1) -- 排队中或等待中的人
|
||||||
|
AND c.create_day=#{today}
|
||||||
) AS waiting_count, -- 前面有几个人
|
) AS waiting_count, -- 前面有几个人
|
||||||
(
|
(
|
||||||
SELECT COUNT(1) * b.wait_time
|
SELECT COUNT(1) * b.wait_time
|
||||||
@@ -61,6 +62,7 @@
|
|||||||
AND c.shop_id=a.shop_id -- 同一张桌子
|
AND c.shop_id=a.shop_id -- 同一张桌子
|
||||||
AND c.create_time < a.create_time -- 在当前用户之前排队
|
AND c.create_time < a.create_time -- 在当前用户之前排队
|
||||||
AND c.state IN (0, 1) -- 排队中或等待中的人
|
AND c.state IN (0, 1) -- 排队中或等待中的人
|
||||||
|
AND c.create_day=#{today}
|
||||||
) AS wait_time -- 预计等待时间
|
) AS wait_time -- 预计等待时间
|
||||||
FROM
|
FROM
|
||||||
tb_call_queue a
|
tb_call_queue a
|
||||||
@@ -80,7 +82,7 @@
|
|||||||
and a.open_id = #{openId} -- 替换为目标用户的 open_id
|
and a.open_id = #{openId} -- 替换为目标用户的 open_id
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
and a.state != 3
|
and a.state in (0, 1)
|
||||||
GROUP BY
|
GROUP BY
|
||||||
a.id, a.user_id, b.name, b.note, b.wait_time
|
a.id, a.user_id, b.name, b.note, b.wait_time
|
||||||
ORDER BY
|
ORDER BY
|
||||||
|
|||||||
Reference in New Issue
Block a user