瀏覽代碼

修改注释

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

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

@@ -77,7 +77,7 @@ class RebateService extends Service
         $this->order = $this->app->db->name('ShopOrder')->where($map)->find();
         if (empty($this->order)) throw new Exception('订单不存在');
         if ($this->order['payment_type'] === 'balance') return;
-        //throw new Exception('余额支付不反利');
+        // throw new Exception('余额支付不反利');
         // 检查订单参与返利
         if ($this->order['amount_total'] <= 0) throw new Exception('订单金额为零');
         if ($this->order['rebate_amount'] <= 0) throw new Exception('订单返利为零');

+ 1 - 3
app/data/service/UserRebateService.php

@@ -23,9 +23,7 @@ class UserRebateService extends Service
             $count = $this->app->db->name('DataUserTransfer')->whereRaw("uid='{$uuid}' and status>0")->sum('amount');
             $total = $this->app->db->name('DataUserRebate')->whereRaw("uid='{$uuid}' and status=1 and deleted=0")->sum('amount');
             $locks = $this->app->db->name('DataUserRebate')->whereRaw("uid='{$uuid}' and status=0 and deleted=0")->sum('amount');
-            $this->app->db->name('DataUser')->where(['id' => $uuid])->update([
-                'rebate_total' => $total, 'rebate_used' => $count, 'rebate_lock' => $locks,
-            ]);
+            $this->app->db->name('DataUser')->where(['id' => $uuid])->update(['rebate_total' => $total, 'rebate_used' => $count, 'rebate_lock' => $locks]);
         } else {
             $count = $this->app->db->name('DataUserTransfer')->whereRaw("status>0")->sum('amount');
             $total = $this->app->db->name('DataUserRebate')->whereRaw("status=1 and deleted=0")->sum('amount');

+ 1 - 1
vendor/services.php

@@ -1,5 +1,5 @@
 <?php 
-// This file is automatically generated at:2021-05-20 13:55:29
+// This file is automatically generated at:2021-05-21 13:45:01
 declare (strict_types = 1);
 return array (
   0 => 'think\\admin\\Library',