获取服务疗程详细列表

This commit is contained in:
曹磊 2024-06-15 21:18:01 +08:00
parent 0e1e0813fa
commit 0fb820c8a1
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@
sum(case a.status when 1 then 1 else 0 end) as usedQuantity,
sum(case a.status when 0 then 1 else 0 end) as unUsedQuantity,
concat(round(count(massage_type_id)*avg(interval_days)),'天一疗程,每隔',round(avg(interval_days)),'天一次,共',round(count(massage_type_id)),'次') as interval_days_str,
(select max(end_times) from orders o where a.massage_type_id = a.massage_type_id and b.user_id = o.user_id and b.id = o.user_package_id) as max_time
(select max(end_times) from orders o where a.massage_type_id = o.massage_type_id and b.id = o.user_package_id) as max_time
from bl_user_package_detail a
inner join bl_user_package b on a.main_id = b.id
where a.main_id = #{mainId}