Commit 83b3858b by huluobin

update

parent d4c35b8f
......@@ -348,7 +348,7 @@ public class MarketServiceImpl implements MarketService {
});
OrderManage orderManage = orderManageMapper.selectById(orderId);
couponsForConsumptionService.sendGift(orderManage.getOrderUser(), CouponsGift.BEHAVIOR_FINISH_ORDER,orderId);
couponsForConsumptionService.sendGift(orderManage.getOrderUser(), CouponsGift.BEHAVIOR_FINISH_ORDER, orderId);
}
......@@ -1339,7 +1339,6 @@ public class MarketServiceImpl implements MarketService {
} else {
throw new RRException("%s与其他卡券冲突", couponCustomerRelevance.getCouponName());
}
});
}
......
......@@ -8,18 +8,23 @@
LEFT JOIN coupons_for_consumption t2 on t2.order_amount_type = 1
and t1.total_price <= t2.order_amount_up
and t1.total_price > t2.order_amount_down
LEFT JOIN order_serve t3 on t1.id = t3.order_id and t2.order_serve_type = t3.serve_type
where t1.id = #{orderId}
and t2.id is not null
and t1.department_id = t2.store_id
and t3.id is not null
union
SELECT t3.*
SELECT t2.*
from order_manage t1
LEFT JOIN coupons_for_consumption t3 on t3.order_amount_type = 2
and t1.total_payment_amount <= t3.order_amount_up
and t1.total_payment_amount >= t3.order_amount_down
and t1.department_id = t3.store_id
LEFT JOIN coupons_for_consumption t2 on t2.order_amount_type = 2
and t1.total_payment_amount <= t2.order_amount_up
and t1.total_payment_amount >= t2.order_amount_down
and t1.department_id = t2.store_id
LEFT JOIN order_serve t3 on t1.id = t3.order_id and t2.order_serve_type = t3.serve_type
where t1.id = #{orderId}
and t2.id is not null
and t3.id is not null
and t1.department_id = t2.store_id
order by orders
limit 1
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment