Browse Source

提现限制

Kirin 2 years ago
parent
commit
30a4103189
1 changed files with 4 additions and 34 deletions
  1. 4 34
      app/models/store/StoreOrder.php

+ 4 - 34
app/models/store/StoreOrder.php

@@ -2786,10 +2786,7 @@ class StoreOrder extends BaseModel
                     $real_send = bcsub($brokeragePrice, $send, 2);
                     if ($real_send > 0) {
                         $mark = '用户' . $userInfo['nickname'] . '(' . $order['uid'] . ')' . '购买套装商品,获得极差奖励' . $real_send;
-                        $res = $res && UserBill::income('套装极差奖', $spread['uid'], 'now_money', 'brokerage', $real_send, $order['id'], bcadd($balance, $real_send, 2), $mark);
-                        $res = $res && User::where('uid', $spread['uid'])->inc('brokerage_price', $real_send)->update();
-                        $balance = bcadd($balance, $real_send, 2);
-                        $send = $brokeragePrice;
+                        var_dump($mark);
                     }
                 }
                 if (($group_level['company_award'] > 0 || $award_level['company_award'] > 0) && !$company_award) {
@@ -2807,43 +2804,18 @@ class StoreOrder extends BaseModel
                         }
                         $spread_up = User::where('uid', $spread_up['spread_uid'])->find();
                     }
-//                    @file_put_contents('order.txt', '【8.9】' . time() . PHP_EOL, FILE_APPEND);
-//                    $c = [];
-//                    $p = [$spread['uid']];
-//                    while ($p) {
-//                        $child = User::where('spread_uid', 'in', $p)->where(function ($query) use ($group_levels, $award_levels) {
-//                            if (count($group_levels) && count($award_levels)) {
-//                                $query->where('group_level', 'in', $group_levels)
-//                                    ->whereOr('award_level', 'in', $award_levels);
-//                            } else if (count($group_levels)) {
-//                                $query->where('group_level', 'in', $group_levels);
-//                            } else if (count($award_levels)) {
-//                                $query->where('award_level', 'in', $award_levels);
-//                            } else {
-//                                $query->where('award_level', '100000000000');
-//                            }
-//                        })->column('uid');
-//                        if (count($child)) {
-//                            $c = array_merge($c, $child);
-//                        }
-//                        $p = User::where('spread_uid', 'in', $p)->where('uid', 'not in', $child)->column('uid');
-//                    }
-//                    $ratio += count(array_unique($c));
                     if ($ratio > 0) {
                         $op_award = bcmul($suit_price, bcdiv($ratio, 100, 4), 2);
                         if ($op_award > 0) {
                             $mark = '用户' . $userInfo['nickname'] . '(' . $order['uid'] . ')' . '购买套装商品,获得分公司奖奖励' . $op_award;
-                            $res = $res && UserBill::income('分公司奖', $spread['uid'], 'now_money', 'brokerage', $op_award, $order['id'], bcadd($balance, $op_award, 2), $mark);
-                            $res = $res && User::where('uid', $spread['uid'])->inc('brokerage_price', $op_award)->update();
-                            $balance = bcadd($balance, $op_award, 2);
+                            var_dump($mark);
                         }
                     }
                     if ($p_ratio > 0) {
                         $op_award = bcmul($suit_price, bcdiv($p_ratio, 100, 4), 2);
                         if ($op_award > 0) {
                             $mark = '用户' . $userInfo['nickname'] . '(' . $order['uid'] . ')' . '购买套装商品,获得分公司奖奖励' . $op_award;
-                            $res = $res && UserBill::income('分公司奖', $spread_up['uid'], 'now_money', 'brokerage', $op_award, $order['id'], bcadd($spread_up['brokerage_price'], $op_award, 2), $mark);
-                            $res = $res && User::where('uid', $spread_up['uid'])->inc('brokerage_price', $op_award)->update();
+                            var_dump($mark);
                         }
                     }
                     $company_award = true;
@@ -2854,9 +2826,7 @@ class StoreOrder extends BaseModel
                         $op_award = bcmul($suit_price, bcdiv($ratio, 100, 4), 2);
                         if ($op_award > 0) {
                             $mark = '用户' . $userInfo['nickname'] . '(' . $order['uid'] . ')' . '购买套装商品,获得运营公司奖励' . $op_award;
-                            $res = $res && UserBill::income('运营公司奖', $spread['uid'], 'now_money', 'brokerage', $op_award, $order['id'], bcadd($balance, $op_award, 2), $mark);
-                            $res = $res && User::where('uid', $spread['uid'])->inc('brokerage_price', $op_award)->update();
-                            $balance = bcadd($balance, $op_award, 2);
+                            var_dump($mark);
                         }
                     }
                     $operate_award = true;