套餐服务次数
This commit is contained in:
parent
aa08d9a985
commit
46d6bb23f1
|
@ -59,7 +59,14 @@
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="findPackageAndMassagePage" resultType="com.sqx.modules.bl.massage.entity.MassagePackage">
|
<select id="findPackageAndMassagePage" resultType="com.sqx.modules.bl.massage.entity.MassagePackage">
|
||||||
select a.id,title,a.type,b.value as type_name,old_price,price,package_img,content,content_img,add_num,sales,labels,'套餐' as flag,is_can_coupon,is_can_vip
|
select a.id,title,a.type,b.value as type_name,old_price,price,package_img,content,content_img,add_num,sales,labels,'套餐' as flag,is_can_coupon,is_can_vip,
|
||||||
|
(case when a.type in (105,106) then
|
||||||
|
(
|
||||||
|
select sum(service_count) from bl_massage_package_detail d
|
||||||
|
inner join massage_type t on t.massage_type_id = d.massage_type_id and t.status = 1
|
||||||
|
where d.main_id = a.id
|
||||||
|
) else 1 end
|
||||||
|
) as service_count
|
||||||
from bl_massage_package a
|
from bl_massage_package a
|
||||||
left join sys_dict b on a.type = b.id
|
left join sys_dict b on a.type = b.id
|
||||||
where a.status = 1
|
where a.status = 1
|
||||||
|
@ -70,7 +77,8 @@
|
||||||
and a.title like concat('%',#{params.title},'%')
|
and a.title like concat('%',#{params.title},'%')
|
||||||
</if>
|
</if>
|
||||||
union all
|
union all
|
||||||
select massage_type_id as id,title,classify_id as type,b.value as type_name,old_price,price,massage_img,jianjie,content_img,add_num,sales,labels,'项目' as flag,1 as is_can_coupon,1 as is_can_vip
|
select massage_type_id as id,title,classify_id as type,b.value as type_name,old_price,price,massage_img,jianjie,content_img,add_num,sales,labels,'项目' as flag,1 as is_can_coupon,1 as is_can_vip,
|
||||||
|
1 as service_count
|
||||||
from massage_type a
|
from massage_type a
|
||||||
left join sys_dict b on a.classify_id = b.id
|
left join sys_dict b on a.classify_id = b.id
|
||||||
where a.status = 1
|
where a.status = 1
|
||||||
|
|
Loading…
Reference in New Issue