浏览代码

会员升级

Kirin 1 年之前
父节点
当前提交
08eaf0805a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/services/user/UserAwardIntegralServices.php

+ 2 - 2
app/services/user/UserAwardIntegralServices.php

@@ -229,7 +229,7 @@ class UserAwardIntegralServices extends BaseServices
         }
         @file_put_contents('add', $dump . PHP_EOL, FILE_APPEND);
         if ($old) {
-            $old->delete();
+            UserIntegral::where('id', $old['id'])->delete();
         }
         return $this->dao->save([
             'uid' => $uid,
@@ -241,7 +241,7 @@ class UserAwardIntegralServices extends BaseServices
             'link_id' => $link_id,
             'mark' => $mark,
             'order_price' => $order_price,
-            'add_time' => $add_time ?: time(),
+            'add_time' => $add_time,
             'status' => $inc_integral > 0 ? 0 : 1,
         ]);
 //        return true;