|
|
|
@@ -70,15 +70,14 @@ |
|
|
|
select o.id orderId,o.order_status orderStatus,o.order_group_id orderGroupId,c.title,c.sub_title subTitle, |
|
|
|
c.sale_price salePrice,c.cover_img coverImg,g.remain_people remainPeople,c.id couponId,g.expired_date |
|
|
|
expiredDate,g.status,g.user_id firstUser,u.nick_name nickName,u.avatar_url avatarUrl,o.tenant_id tenantId, |
|
|
|
cc.id couponChannelId,c.press_limit_num pressLimitNum,c.status couponStatus |
|
|
|
o.coupon_channel_id couponChannelId,c.press_limit_num pressLimitNum,c.status couponStatus |
|
|
|
from wx_order o |
|
|
|
left join wx_coupon c on o.product_id=c.id |
|
|
|
left join wx_order_group g on o.order_group_id=g.id |
|
|
|
left join wx_c_user u on o.c_user_id=u.id |
|
|
|
left join wx_coupon_channel cc on c.id=cc.coupon_id |
|
|
|
where o.tenant_id=#{tenantId} |
|
|
|
<if test=" null != cUserId "> |
|
|
|
and o.c_user_id=#{cUserId} and o.order_status not in(0,1,2,3,14) |
|
|
|
and o.c_user_id=#{cUserId} |
|
|
|
</if> |
|
|
|
<if test=" null != id "> |
|
|
|
and o.id=#{id} |
|
|
|
@@ -86,7 +85,7 @@ |
|
|
|
<if test=" null != orderGroupId "> |
|
|
|
and o.order_group_id=#{orderGroupId} |
|
|
|
</if> |
|
|
|
and o.order_group_id!=0 and g.status in(10,11,12,13) |
|
|
|
and o.order_status in(10,11,12,13,15) |
|
|
|
order by o.id desc,o.order_status |
|
|
|
|
|
|
|
</select> |
|
|
|
|