Browse Source

会员升级

Kirin 2 months ago
parent
commit
cb9f2f0dab
2 changed files with 11 additions and 3 deletions
  1. 9 1
      app/model/user/AwardIntegral.php
  2. 2 2
      app/services/user/AwardIntegralServices.php

+ 9 - 1
app/model/user/AwardIntegral.php

@@ -120,6 +120,10 @@ class AwardIntegral extends BaseModel
             })->where('order_price', '>=', $award_order_limit)
                 ->where('add_time', '>=', strtotime('2024-11-18'))
                 ->where('pay_type', '<>', 'yue');
+        } else if ($value == 3) {
+            $query->where('order_price', '>=', $award_order_limit)
+                ->where('add_time', '>=', strtotime('2024-11-18'))
+                ->where('pay_type', '<>', 'yue');
         } else {
             $query->where('order_price', '<', $award_order_limit)
                 ->whereOr('add_time', '<', strtotime('2024-11-18'))
@@ -148,7 +152,11 @@ class AwardIntegral extends BaseModel
             })->where('order_price', '>=', $award_order_limit)
                 ->where('add_time', '>=', strtotime('2024-11-18'))
                 ->where('pay_type', '<>', 'yue');
-        } else {
+        } else if ($value == 3) {
+            $query->where('order_price', '>=', $award_order_limit)
+                ->where('add_time', '>=', strtotime('2024-11-18'))
+                ->where('pay_type', '<>', 'yue');
+        }  else {
             $query->where('order_price', '<', $award_order_limit)
                 ->whereOr('add_time', '<', strtotime('2024-11-18'))
                 ->whereOr('pay_type', 'yue');

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

@@ -96,7 +96,7 @@ class AwardIntegralServices extends BaseServices
      */
     public function getPaySum($uid)
     {
-        $where = ['uid' => $uid, 'valid' => 1];
+        $where = ['uid' => $uid, 'valid' => 3];
         return $this->dao->sum($where, 'order_price', true);
     }
 
@@ -106,7 +106,7 @@ class AwardIntegralServices extends BaseServices
      */
     public function getPaySum2($uid)
     {
-        $where = ['uid' => $uid, 'valids' => 1];
+        $where = ['uid' => $uid, 'valids' => 3];
         return $this->dao->sum($where, 'order_price', true);
     }