WIN-2308041133\Administrator 5 months ago
parent
commit
358a66f627
2 changed files with 3 additions and 3 deletions
  1. 1 1
      app/common/model/user/GiftLevel.php
  2. 2 2
      app/common/model/user/OilLevel.php

+ 1 - 1
app/common/model/user/GiftLevel.php

@@ -32,7 +32,7 @@ class GiftLevel extends BaseModel
         $achievement = bcadd($achievement1, $achievement2, 2);
         $achievement = bcadd($achievement1, $achievement2, 2);
         @file_put_contents('quanju2.txt', $achievement."-礼包总业绩\r\n", 8);
         @file_put_contents('quanju2.txt', $achievement."-礼包总业绩\r\n", 8);
 
 
-        $old_level = self::where('id', $user['level'])->find();
+        $old_level = self::where('id', $user['gift_level'])->find();
         if (!$old_level) $old_level = [
         if (!$old_level) $old_level = [
             'grade' => 0,
             'grade' => 0,
             'name' => '普通会员'
             'name' => '普通会员'

+ 2 - 2
app/common/model/user/OilLevel.php

@@ -29,8 +29,8 @@ class OilLevel extends BaseModel
         $achievement2 = StoreOrder::where('uid', $uid)->where('paid', 1)->where('product_type',1)->whereNotIn('status',-1)->sum('pay_price');
         $achievement2 = StoreOrder::where('uid', $uid)->where('paid', 1)->where('product_type',1)->whereNotIn('status',-1)->sum('pay_price');
 
 
         $achievement = bcadd($achievement1, $achievement2, 2);
         $achievement = bcadd($achievement1, $achievement2, 2);
-        @file_put_contents('quanju2.txt', $achievement."-节能油订单总额\r\n", 8);
-        $old_level = self::where('id', $user['level'])->find();
+        @file_put_contents('quanju2.txt', $achievement."- 额\r\n", 8);
+        $old_level = self::where('id', $user['oil_level'])->find();
         if (!$old_level) $old_level = [
         if (!$old_level) $old_level = [
             'grade' => 0,
             'grade' => 0,
             'name' => '普通会员'
             'name' => '普通会员'