Unverified Commit 0bbe4d0f authored by 康宁's avatar 康宁 Committed by Gitee
Browse files

【修复】优惠券在多个订单中重复使用

parent db5621f8
Showing with 1 addition and 1 deletion
+1 -1
......@@ -611,7 +611,7 @@ class BaseOrder
{
foreach($result as $store_id => $order_id) {
if(isset($coupon[$store_id]['coupon_sn'])) {
$query = CouponsnModel::find()->select('remain_times')->where(['coupon_sn' => $coupon[$store_id]['coupon_sn']])->one();
$query = CouponsnModel::find()->where(['coupon_sn' => $coupon[$store_id]['coupon_sn']])->one();
if ($query->remain_times > 0) {
$query->updateCounters(['remain_times' => -1]);
}
......
Supports Markdown
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