|
@@ -22,30 +22,29 @@
|
|
|
<select id="listByQueryWrapper" resultType="com.qs.mp.admin.domain.vo.TicketBoxGoodsVO">
|
|
|
select
|
|
|
case t1.type
|
|
|
- when 'goods' then if(t2.title is not null, t2.title, t1.title)
|
|
|
- when 'coupon' then if(t3.title is not null, t3.title, t1.title)
|
|
|
- when 'coupon_pkg' then if(t4.title is not null, t4.title, t1.title)
|
|
|
- else t1.title
|
|
|
- end as title,
|
|
|
+ when 'goods' then if(t2.title is not null, t2.title, t1.title)
|
|
|
+ when 'coupon' then if(t3.title is not null, t3.title, t1.title)
|
|
|
+ when 'coupon_pkg' then if(t4.title is not null, t4.title, t1.title)
|
|
|
+ else t1.title
|
|
|
+ end as title,
|
|
|
|
|
|
case t1.type
|
|
|
- when 'goods' then if(t2.pic_url is not null, t2.pic_url, t1.pic_url)
|
|
|
- when 'coupon' then if(t3.pic_url is not null, t3.pic_url, t1.pic_url)
|
|
|
- when 'coupon_pkg' then if(t4.pic_url is not null, t4.pic_url, t1.pic_url)
|
|
|
- else t1.pic_url
|
|
|
- end as pic_url,
|
|
|
+ when 'goods' then if(t2.pic_url is not null, t2.pic_url, t1.pic_url)
|
|
|
+ when 'coupon' then if(t3.pic_url is not null, t3.pic_url, t1.pic_url)
|
|
|
+ when 'coupon_pkg' then if(t4.pic_url is not null, t4.pic_url, t1.pic_url)
|
|
|
+ else t1.pic_url
|
|
|
+ end as pic_url,
|
|
|
|
|
|
case t1.type
|
|
|
- when 'goods' then if(t2.value is not null, t2.value, t1.value)
|
|
|
- when 'coupon' then if(t3.discount is not null, t3.discount, t1.value)
|
|
|
- when 'coupon_pkg' then if(t4.face_price is not null, t4.face_price, t1.value)
|
|
|
- else t1.value
|
|
|
-
|
|
|
- end as value,
|
|
|
+ when 'goods' then if(t2.value is not null, t2.value, t1.value)
|
|
|
+ when 'coupon' then if(t3.discount is not null, t3.discount, t1.value)
|
|
|
+ when 'coupon_pkg' then if(t4.face_price is not null, t4.face_price, t1.value)
|
|
|
+ else t1.value
|
|
|
+ end as value,
|
|
|
|
|
|
case t1.type
|
|
|
- when 'goods' then if(t2.cost is not null, t2.cost, 0)
|
|
|
- else 0
|
|
|
+ when 'goods' then if(t2.cost is not null, t2.cost, 0)
|
|
|
+ else 0
|
|
|
end as cost,
|
|
|
|
|
|
t1.*
|