瀏覽代碼

修改差额奖

邹景立 3 年之前
父節點
當前提交
f846af063d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/data/service/RebateService.php

+ 1 - 1
app/data/service/RebateService.php

@@ -273,7 +273,7 @@ class RebateService extends Service
         if (empty($vips) || empty($users)) return true;
         // 查询需要计算奖励的商品
         foreach (ShopOrderItem::mk()->where(['order_no' => $this->order['order_no']])->cursor() as $item) {
-            if ($item['discount_id'] > 0) {
+            if ($item['discount_id'] > 0 && $item['rebate_type'] === 1) {
                 [$tVip, $tRate] = [$item['vip_code'], $item['discount_rate']];
                 $map = ['id' => $item['discount_id'], 'status' => 1, 'deleted' => 0];
                 $rules = json_decode(BaseUserDiscount::mk()->where($map)->value('items', '[]'), true);