WIN-2308041133\Administrator 4 months ago
parent
commit
3a700c0d78
2 changed files with 4 additions and 3 deletions
  1. 4 2
      app/models/store/StoreOrder.php
  2. 0 1
      app/models/store/StoreProduct.php

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

@@ -904,15 +904,17 @@ class StoreOrder extends BaseModel
                     $level = $make->where('id',$k)->find();  //用户等级
                     if ($level) {
                         $ratio = bcmul($level[$field],0.01,2);  //奖励比例
+                        @file_put_contents('quanju.txt', $ratio . "-当前等级比例\r\n", 8);
                         $award_price = bcmul($order['pay_price'], $ratio, 2);  //奖励金额
-                        @file_put_contents('quanju.txt', $k . "-当前等级分到的总金额\r\n", 8);
+                        @file_put_contents('quanju.txt', $award_price . "-当前等级分到的总金额\r\n", 8);
                         $user_award = bcdiv($award_price,$v,2); //每个用户奖励金额
-                        @file_put_contents('quanju.txt', $k . "-当前等级分到的个人金额\r\n", 8);
+                        @file_put_contents('quanju.txt', $user_award . "-当前等级分到的个人金额\r\n", 8);
                         if ($user_award <=0){
                             continue;
                         }
                         foreach ($level_group as $key => $value){
                             $after = bcadd($value['brokerage_price'], $user_award, 2);  //更新用户奖励金额
+                            @file_put_contents('quanju.txt', $after . "-当前等级分到个人金额结算之后\r\n", 8);
                             $mark = $value['nickname'].'获得分账健康币'.$title . ':' . $award_price . '元';
                             $res = UserBill::income('获得分账健康币', $value['uid'], 'brokerage_price', 'spread_award', $award_price, $order['id'], $after, $mark, 0);
                             User::where('uid', $value['uid'])->update(['brokerage_price' => $after]);

+ 0 - 1
app/models/store/StoreProduct.php

@@ -286,7 +286,6 @@ class StoreProduct extends BaseModel
      * */
     public static function setLevelPrice($list, $uid, $isSingle = false, $is_vip = 0)  //$is_vip为1说明是报单普惠积分商品 不吃折扣
     {
-        @file_put_contents('quanju.txt', json_encode($list) . "-计算vip价格\r\n", 8);
         if (is_object($list)) $list = count($list) ? $list->toArray() : [];
         if (!sys_config('vip_open')) {
             if (is_array($list)) return $list;