|
|
@@ -1049,31 +1049,7 @@ class StoreOrderRepository extends BaseRepository
|
|
1049
|
1049
|
];
|
|
1050
|
1050
|
$user_res_log = Db::name("user_sign_vr")->insert($log_data);
|
|
1051
|
1051
|
|
|
1052
|
|
- //会员专区,给用户升级判断
|
|
1053
|
|
- $orderList = Db::name("store_order")->where("uid", $uid)->where("mer_id", 496)->where("status", "in", [0, 1, 2, 3])->select();
|
|
1054
|
|
- // 初始化总和变量
|
|
1055
|
|
- $totalPayPrice = 0;
|
|
1056
|
|
-
|
|
1057
|
|
- // 遍历查询结果
|
|
1058
|
|
- foreach ($orderList as $order) {
|
|
1059
|
|
-
|
|
1060
|
|
-
|
|
1061
|
|
- // 累加 pay_price
|
|
1062
|
|
- $totalPayPrice += $order['pay_price'];
|
|
1063
|
|
- }
|
|
1064
|
|
- $userdata = Db::name("user")->where("uid", $uid)->find();
|
|
1065
|
|
-
|
|
1066
|
|
- if ($totalPayPrice >= 1180 && $totalPayPrice < 11800) {
|
|
1067
|
|
-
|
|
1068
|
|
- if ($userdata['user_group'] <= 1) {
|
|
1069
|
|
- Db::name("user")->where("uid", $uid)->update(["user_group" => 2]);
|
|
1070
|
|
- }
|
|
1071
|
|
-
|
|
1072
|
|
- } else if ($totalPayPrice >= 11800) {
|
|
1073
|
|
- if ($userdata['user_group'] <= 2) {
|
|
1074
|
|
- Db::name("user")->where("uid", $uid)->update(["user_group" => 3]);
|
|
1075
|
|
- }
|
|
1076
|
|
- }
|
|
|
1052
|
+
|
|
1077
|
1053
|
|
|
1078
|
1054
|
|
|
1079
|
1055
|
} else if (!empty($array_fzone_paytype['type'] == 'a3')) {
|
|
|
@@ -9889,6 +9865,31 @@ class StoreOrderRepository extends BaseRepository
|
|
9889
|
9865
|
|
|
9890
|
9866
|
}
|
|
9891
|
9867
|
|
|
|
9868
|
+ //会员专区,给用户升级判断
|
|
|
9869
|
+ $orderList = Db::name("store_order")->where("uid", $store_order_data['uid'])->where("mer_id", 496)->where("status", "in", [0, 1, 2, 3])->select();
|
|
|
9870
|
+ // 初始化总和变量
|
|
|
9871
|
+ $totalPayPrice = 0;
|
|
|
9872
|
+
|
|
|
9873
|
+ // 遍历查询结果
|
|
|
9874
|
+ foreach ($orderList as $order) {
|
|
|
9875
|
+ // 累加 pay_price
|
|
|
9876
|
+ $totalPayPrice += $order['pay_price'];
|
|
|
9877
|
+ }
|
|
|
9878
|
+
|
|
|
9879
|
+ $userdata = Db::name("user")->where("uid", $store_order_data['uid'])->find();
|
|
|
9880
|
+
|
|
|
9881
|
+ if ($totalPayPrice >= 1180 && $totalPayPrice < 11800) {
|
|
|
9882
|
+
|
|
|
9883
|
+ if ($userdata['user_group'] <= 1) {
|
|
|
9884
|
+ Db::name("user")->where("uid", $store_order_data['uid'])->update(["user_group" => 2]);
|
|
|
9885
|
+ }
|
|
|
9886
|
+
|
|
|
9887
|
+ } else if ($totalPayPrice >= 11800) {
|
|
|
9888
|
+ if ($userdata['user_group'] <= 2) {
|
|
|
9889
|
+ Db::name("user")->where("uid", $store_order_data['uid'])->update(["user_group" => 3]);
|
|
|
9890
|
+ }
|
|
|
9891
|
+ }
|
|
|
9892
|
+
|
|
9892
|
9893
|
|
|
9893
|
9894
|
}
|
|
9894
|
9895
|
|