Kirin 1 gadu atpakaļ
vecāks
revīzija
3dd340aaf6

+ 6 - 6
app/model/user/UserIntegral.php

@@ -37,12 +37,12 @@ class UserIntegral extends BaseModel
      */
     protected $name = 'user_integral';
 
-    protected $insert = ['add_time'];
-
-    protected function setAddTimeAttr()
-    {
-        return time();
-    }
+//    protected $insert = ['add_time'];
+//
+//    protected function setAddTimeAttr()
+//    {
+//        return time();
+//    }
 
     /**
      * 关联user

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

@@ -221,7 +221,7 @@ class UserAwardIntegralServices extends BaseServices
     public function incIntegralAdmin(int $uid, string $price, string $total, float $order_price, int $type, string $extract_sum, int $link_id = 0, string $mark = '', $add_time = 0)
     {
         $inc_integral = bcdiv($total, $price, 5);
-        $old = UserIntegral::where('uid', $uid)->where('link_id', $link_id)->where('type', $type)->whereLike('mark', '%$mark%')->find();
+        $old = UserIntegral::where('uid', $uid)->where('link_id', $link_id)->where('type', $type)->whereLike('mark', '%' . $mark . '%')->find();
         if ($old) {
             $dump = '用户' . $uid . $mark . '补' . bcsub($inc_integral, $old['num'], 5);
         } else {