WakooHome 1 gadu atpakaļ
vecāks
revīzija
0672125400
1 mainītis faili ar 25 papildinājumiem un 24 dzēšanām
  1. 25 24
      app/controller/api/Notify.php

+ 25 - 24
app/controller/api/Notify.php

@@ -679,30 +679,31 @@ class Notify
679 679
                                     
680 680
                                 }
681 681
 
682
-                                //会员专区,给用户升级判断
683
-                                $orderList = Db::name("store_order")->where("uid", $store_order_data['uid'])->where("mer_id", 496)->where("status", "in", [0, 1, 2, 3])->select();
684
-                                // 初始化总和变量
685
-                                $totalPayPrice = 0;
686
-
687
-                                // 遍历查询结果
688
-                                foreach ($orderList as $order) {
689
-                                    // 累加 pay_price
690
-                                    $totalPayPrice += $order['pay_price'];
691
-                                }
692
-
693
-                                $userdata = Db::name("user")->where("uid", $store_order_data['uid'])->find();
694
-
695
-                                if ($totalPayPrice >= 1180 && $totalPayPrice < 11800) {
696
-
697
-                                    if ($userdata['user_group'] <= 1) {
698
-                                        Db::name("user")->where("uid", $store_order_data['uid'])->update(["user_group" => 2]);
699
-                                    }
700
-
701
-                                } else if ($totalPayPrice >= 11800) {
702
-                                    if ($userdata['user_group'] <= 2) {
703
-                                        Db::name("user")->where("uid", $store_order_data['uid'])->update(["user_group" => 3]);
704
-                                    }
705
-                                }
682
+                              
683
+             //会员专区,给用户升级判断
684
+             $orderList = Db::name("store_order")->where("uid", $store_order_data['uid'])->where("mer_id", 496)->where("status", "in", [0, 1, 2, 3])->select();
685
+             // 初始化总和变量
686
+             $totalPayPrice = 0;
687
+
688
+             // 遍历查询结果
689
+             foreach ($orderList as $order) {
690
+                 // 累加 pay_price
691
+                 $totalPayPrice += $order['pay_price'];
692
+             }
693
+
694
+             $userdata = Db::name("user")->where("uid", $store_order_data['uid'])->find();
695
+
696
+             if ($totalPayPrice >= 1180 && $totalPayPrice < 11800) {
697
+
698
+                 if ($userdata['user_group'] <= 1) {
699
+                     Db::name("user")->where("uid", $store_order_data['uid'])->update(["user_group" => 2]);
700
+                 }
701
+
702
+             } else if ($totalPayPrice >= 11800) {
703
+                 if ($userdata['user_group'] <= 2) {
704
+                     Db::name("user")->where("uid", $store_order_data['uid'])->update(["user_group" => 3]);
705
+                 }
706
+             }
706 707
 
707 708
 
708 709
                             }