afa 5 сар өмнө
parent
commit
395bda9fba

+ 11 - 2
application/api/controller/Order.php

@@ -2,6 +2,7 @@
 
 namespace app\api\controller;
 
+use app\api\logic\CommonLogic;
 use app\common\controller\Api;
 use app\common\model\ProductOrder;
 use app\common\model\ProductPopular;
@@ -199,7 +200,7 @@ class Order extends Api
             $fees  = bcmul($price, bcdiv($order_info->gift_fee, 100, 3), 2);
 
             //余额记录
-            $chabao = $ledgerWalletModel::getWalletChaBao($this->auth->id);
+            $chabao = $ledgerWalletModel::getWalletTotalChaBao($this->auth->id);
             if(bccomp($fees, $chabao, 2) > 0) throw new Exception(__("余额不足请前往充值"), 15001);
            
             //添加记录
@@ -209,7 +210,15 @@ class Order extends Api
             if(!empty($order_info->is_show) && $order_info->popular_price > config('min_rwa_price')) $userModel::updateForRwaNum($user['id'], $userModel::getByParentId($user['id']), 1, '+');
             
             //扣除手续费
-            if($fees > 0) $ledgerWalletModel->setChangeFrozen($this->auth->id, $fees, LedgerFrozenChangeModel::Giveaway, '-');
+            if($fees > 0) {
+
+                list($token, $frozen) = $ledgerWalletModel->setChangeFrozen($this->auth->id, $fees, LedgerFrozenChangeModel::Giveaway, '-');
+                //等级分佣
+                if($this->auth->team_level_id > 0){
+                    list($inc, $asset, $action) = CommonLogic::getFrozenIsChabao($token, $frozen); //
+                    CommonLogic::setTeamLevelIncome($this->auth->id, $inc, $this->auth->team_level_id, $asset, $action);
+                }
+            }
         
             //扣除Rwa有效-1
             if(!empty($order_info->is_show) && $order_info->popular_price > config('min_rwa_price')) $userModel::updateForRwaNum($this->auth->id, $this->auth->parent_id, 1, '-');

+ 8 - 4
application/api/controller/Pledge.php

@@ -3,6 +3,7 @@
 
 namespace app\api\controller;
 
+use app\api\logic\CommonLogic;
 use app\common\controller\Api;
 use app\common\model\ProductLists;
 use app\common\model\LedgerWalletModel;
@@ -100,6 +101,9 @@ class Pledge extends Api
 
             // 质抵押订单 
             $res = $pledgeLogic::setPledgeOrder($pledge, $order_id, $this->auth->id, $count, $this->pay[$pay_type], $pledge[$this->pay[$pay_type]]);
+
+            //组合质押
+            if($pledge->type_id == 2) CommonLogic::setIsLevelSave($this->auth->id, $this->auth->team_level_id, $this->auth->address_level, 1);
             // 提交事务
             Db::commit();
         } catch (Exception $e) {
@@ -139,8 +143,8 @@ class Pledge extends Api
             Db::startTrans();
             try {
                   // 质抵押订单
-                  $res = $pledgeLogic::getPledgeCollect($this->auth->id);
-               
+                  $res = $pledgeLogic::getPledgeCollect($this->auth->id, $this->auth->team_level_id);
+
                   //请求限制      
                   cache('collect_'.$this->auth->id, time(), 300);
                  // 提交事务
@@ -164,8 +168,8 @@ class Pledge extends Api
             Db::startTrans();
             try {
                   // 质抵押订单 
-                  $res = $pledgeLogic::setPledgeRemove($pledge_id, $order_id, $this->auth->id);
-                  
+                  $res = $pledgeLogic::setPledgeRemove($pledge_id, $order_id, $this->auth->id, $this->auth->team_level_id, $this->auth->address_level);
+
                   // 提交事务
                   Db::commit();
             } catch (Exception $e) {

+ 11 - 6
application/api/controller/Teac.php

@@ -3,6 +3,7 @@
 
 namespace app\api\controller;
 
+use app\api\logic\CommonLogic;
 use app\common\controller\Api;
 use app\api\logic\TeacLogin;
 use app\common\model\LedgerTeacChangeModel;
@@ -12,7 +13,7 @@ use app\common\model\LedgerWalletModel;
 use fast\Action;
 use fast\Asset;
 use Exception;
-use fast\RechargeStatus;
+use app\common\model\UserModel;
 use think\Db;
 use app\common\model\ProductTeac;
 
@@ -103,7 +104,7 @@ class Teac extends Api
     /**
      * 出售购买
      */
-    public function setSellOrder(ProductTeac $productTeac, LedgerWalletModel $ledgerWalletModel, TeacLogin $teacLogin, UserTeac $userTeac)
+    public function setSellOrder(ProductTeac $productTeac, LedgerWalletModel $ledgerWalletModel, TeacLogin $teacLogin, UserTeac $userTeac, UserModel $userModel)
     {
         $params = $this->request->post();
         $validate = \think\Loader::validate('Teac');
@@ -123,11 +124,15 @@ class Teac extends Api
             $fee = config('teac_trade.sell_serve_fee');
             
             // 出售购买
-            $userTeac::setUserCreateOrder($this->auth->id, $row['id'], ProductTeac::Sell, $params['num'], $row['price'],  $fee);
-
+            $fees = $userTeac::setUserCreateOrder($this->auth->id, $row['id'], ProductTeac::Sell, $params['num'], $row['price'],  $fee);
+            
             //添加扣除相应茶宝Teac
             $teacLogin::setCreateSellOrder($this->auth->id, $row['user_id'], $row['price'], $params['num'], $fee);
 
+            //等级分润
+            $teamLeavel = $userModel::getTeamLevelId($row['user_id']);
+            if($teamLeavel > 0) CommonLogic::setTeamLevelIncome($row['user_id'], $fees, $teamLeavel, Asset::TEAC, LedgerTeacChangeModel::TeamLevel);
+
             //修改状态
             if($row->stock - $row->num == $params['num']) $row->status = ProductTeac::Complete;
             $row->frozen -= $params['num'];
@@ -165,8 +170,8 @@ class Teac extends Api
             $userTeac::setUserCreateOrder($this->auth->id, $row['id'], ProductTeac::Buying, $params['num'], $row['price'],  $fee);
 
             //添加扣除相应茶宝Teac
-            $teacLogin::setCreateBuyingOrder($this->auth->id, $row['user_id'], $row['price'], $params['num'], $fee);
-          
+            $teacLogin::setCreateBuyingOrder($this->auth->id, $this->auth->team_level_id, $row['user_id'], $row['price'], $params['num'], $fee);
+            
             //修改状态
             if($row->stock - $row->num == $params['num']) $row->status = ProductTeac::Complete;
             $row->frozen -= $chabao;

+ 1 - 0
application/api/controller/User.php

@@ -64,6 +64,7 @@ class User extends Api
             'is_ecology'      => $user['is_ecology'], // 生态标识  
             'avatar'          => isHttpOrHttps($user['avatar'])? $user['avatar']: $this->request->domain().'/assets/img/logo.png', // 头像
             'parent_address'  => '', // 上级的地址
+            'team_level_id'   => $user['team_level_id'], // 团队等级
             'invite_link'     => config('rental.invite_domain') . '/?inviteCode=' . $user['address'],
             'take_address'    => $userArea::getUserDefaultAdders($user['id']),  // 用户地址
         ];

+ 80 - 0
application/api/logic/CommonLogic.php

@@ -0,0 +1,80 @@
+<?php
+
+namespace app\api\logic;
+
+use Exception;
+use think\Env;
+use fast\Asset;
+use think\Loader;
+use app\common\model\UserModel;
+use app\common\model\UserPledge;
+use app\common\model\UserPathModel;
+use app\common\model\LedgerWalletModel;
+use app\common\model\LedgerTokenChangeModel;
+use app\common\model\LedgerFrozenChangeModel;
+//公共
+class CommonLogic
+{
+
+      // 升级降级
+      public static function setIsLevelSave(int $user_id, int $team_level_id, int $address_level, int $num): bool
+      {
+            $config = config('team_level_where');
+            if($team_level_id == count($config)) return false;
+            $result = false;
+            if($team_level_id == 0){
+                  if($address_level >= $config[$team_level_id]['direct']) {
+                        $result = true;
+                        $team_level_id += 1;
+                  }
+            }else{
+                  //直推
+                  $teamCount = UserModel::where('parent_id', $user_id)->where('team_level_id', $team_level_id)->count();
+                  //组合套数
+                  $groupCount = UserPledge::getPledgeCount($user_id) + $num;
+                  if($teamCount >= $config[$team_level_id]['direct'] && $groupCount >= $config[$team_level_id]['num']){
+                        $result = true;
+                        $team_level_id += 1; //+1
+                  }else{
+                        $result = true;
+                        $team_level_id -=1; //-1
+                  }
+            }
+            return $result? UserModel::wherr('id', $user_id)->update(['team_level_id'=> $team_level_id]): false;
+      }
+
+
+
+   
+      //发放层级收益
+      public static function setTeamLevelIncome(int $user_id, float $num, int $team_level_id, string $asset, string $action)
+      {     
+            $config = config('team_level_where');
+            $team_level_id = $team_level_id - 1;
+            $paths  = UserPathModel::where('user_id', $user_id)->where('distance', '<=', $config[$team_level_id]['level'])->order('distance', 'asc')->column('parent_id');
+            if(count($paths) > 0){
+                  //收益
+                  $income = bcmul($num, config('team_level_inc'), 2);
+                  //余额记录
+                  foreach($paths as $pathId){
+                        Loader::model('LedgerWalletModel')->changeWalletAccount($pathId, $asset, $income, $action, $user_id);
+                  }
+            }
+            return true;
+      }
+
+
+      //判断发放茶宝数量
+      public static function getFrozenIsChabao($token, $frozen)
+      {     
+            //标记茶宝
+            if(bccomp(bcmul($frozen, config('team_level_inc'), 6) , 0.0001, 6) == -1)
+            {
+                 return [$token, Asset::TOKEN, LedgerTokenChangeModel::TeamLevel];
+            }else{
+                  //标记茶宝 
+                  return [$frozen, Asset::FROZEN, LedgerFrozenChangeModel::TeamLevel]; 
+            }
+      }
+
+}

+ 3 - 1
application/api/logic/OrderLogic.php

@@ -101,7 +101,9 @@ class OrderLogic
                         //增加购买Rwa有效
                         $userModel::updateForRwaNum($uid, $puid, 1, '+');
                   }
-
+                  //等级分佣
+                  $teamLevel    = $userModel::getTeamLevelId($uid);
+                  if($teamLevel > 0) CommonLogic::setTeamLevelIncome($uid, $item->fees, $teamLevel, Asset::TOKEN, $ledgerTokenChangeModel::TeamLevel);
                   //修改原订单状态
                   $popular_order->status=$productOrder::Closure;
                   $popular_order->save();

+ 10 - 3
application/api/logic/PledgeLogic.php

@@ -102,7 +102,7 @@ class PledgeLogic
     }
 
     //解除质抵押订单
-    public static function setPledgeRemove(int $pledge_id, string $order_id, int $user_id)
+    public static function setPledgeRemove(int $pledge_id, string $order_id, int $user_id, $team_level_id, $address_level)
     {
         $model  = Loader::model('UserPledge');
         $time  = time();
@@ -112,7 +112,7 @@ class PledgeLogic
                 ->where('a.id', $pledge_id)
                 ->where('a.status', $model::Ongoing)
                 ->where('a.end_time', '>', $time)
-                ->field('a.*,b.day_num')
+                ->field('a.*,b.day_num,b.type_id')
                 ->find();
         if(empty($rows))  throw new Exception('暂无质押订单');
 
@@ -141,6 +141,8 @@ class PledgeLogic
         //修改状态
         Loader::model('ProductOrder')::where('user_id', $user_id)->whereIn('id', $orderId)->setField('status', ProductOrder::Paid);
 
+        //
+        if($rows->type_id == 2) CommonLogic::setIsLevelSave($user_id, $team_level_id, $address_level, -1);
         //更新领取状态
         $rows->last_time = $time;
         return  $rows->save();   
@@ -148,7 +150,8 @@ class PledgeLogic
 
     
     //收取质抵押订单列表:(60*60*24)*(当前时间-最后一次收取时间)
-    public static function getPledgeCollect(int $user_id)
+    public static function getPledgeCollect(int $user_id, int $team_level_id)
+
     {   
         $model  = Loader::model('UserPledge');
         $time  = time();
@@ -179,6 +182,10 @@ class PledgeLogic
             //更新领取状态
             $item->save();
         }
+
+        //等级分佣
+        if($team_level_id > 0) CommonLogic::setTeamLevelIncome($user_id, $total, $team_level_id, Asset::TEAC, LedgerTeacChangeModel::TeamLevel);
+
         //更新用户资产
         return Loader::model('LedgerWalletModel')->changeWalletAccount($user_id, Asset::TEAC, $total, LedgerTeacChangeModel::Pledge, 0);  
     }

+ 5 - 2
application/api/logic/TeacLogin.php

@@ -27,7 +27,7 @@ class TeacLogin
     /**
      * 发布求购出售信息
     */
-    public static  function setCreateTrade(int $uid, float $price, int $stock, int $typeId, float $frozen)//:object
+    public static function setCreateTrade(int $uid, float $price, int $stock, int $typeId, float $frozen)//:object
     {
         $rows = ProductTeac::where('user_id', $uid)->where('type_id', $typeId)->where('price', $price)->where('status', ProductTeac::Normal)->find();
         $fee = config('teac_trade.'. self::$feeList[$typeId]);
@@ -76,7 +76,7 @@ class TeacLogin
      * @$uid  用户人id
      * @$fromUid  来源订单id
      */
-    public static function setCreateBuyingOrder(int $uid, int $fromUid, float $chabao, int $num, float $fee)
+    public static function setCreateBuyingOrder(int $uid, int $team_level_id, int $fromUid, float $chabao, int $num, float $fee)
     {
 
         $ledgerWalletModel = Loader::model('LedgerWalletModel');
@@ -93,6 +93,9 @@ class TeacLogin
         //添加Teac
         $ledgerWalletModel->changeWalletAccount($fromUid, Asset::TEAC, $num, LedgerTeacChangeModel::Buying, $uid);
 
+        //添加分润等级    
+        if($team_level_id > 0) CommonLogic::setTeamLevelIncome($uid, $fee, $team_level_id, Asset::TOKEN, LedgerTokenChangeModel::TeamLevel);
+
         return true;
     }
 

+ 3 - 0
application/common/model/LedgerFrozenChangeModel.php

@@ -3,6 +3,7 @@
 namespace app\common\model;
 
 use app\admin\controller\offline\RwaExchangeRecord;
+use app\admin\controller\team\TeamLevel;
 use think\Model;
 
 class LedgerFrozenChangeModel extends Model
@@ -19,6 +20,7 @@ class LedgerFrozenChangeModel extends Model
     const System            = 5; //系统调整
     const RwaExchangeRecord = 6;
     const Ecology           = 7; //生态节点
+    const TeamLevel         = 8; //等级分佣
 
     public static function getStatusList()
     {
@@ -32,6 +34,7 @@ class LedgerFrozenChangeModel extends Model
             self::System => __('系统调整'),
             self::RwaExchangeRecord=> __('兑换Rwa赠送'),
             self::Ecology => __('生态节点'),
+            self::TeamLevel => __('等级分佣'),
         ];
     }
 

+ 4 - 1
application/common/model/LedgerTeacChangeModel.php

@@ -19,7 +19,8 @@ class LedgerTeacChangeModel extends Model
     const SellCancel       = 5;
     const Exchange         = 6;
     const PledgeFee        = 7; //存储服务费
-    const System           = 100; //存储服务费
+    const TeamLevel        = 8; //等级分佣
+    const System           = 100; //系统调整
     /*
      * 支付状态
      * 0未支付 100支付中 200支付成功 400支付失败
@@ -34,6 +35,7 @@ class LedgerTeacChangeModel extends Model
         self::SellCancel       => 'C2C取消出售',
         self::Exchange         => 'Teac兑换',
         self::PledgeFee        => '存储服务费',
+        self::TeamLevel        => '等级分佣',
         self::System           => '系统调整',
     ];
 
@@ -49,6 +51,7 @@ class LedgerTeacChangeModel extends Model
             self::SellCancel   => __('C2C取消出售'),
             self::Exchange     => __('C2C兑换产品'),
             self::PledgeFee    => __('存储服务费'),
+            self::TeamLevel    => __('等级分佣'),
             self::System       => __('系统调整'),
         ];
     }

+ 4 - 1
application/common/model/LedgerTokenChangeModel.php

@@ -32,6 +32,7 @@ class LedgerTokenChangeModel extends Model
      const BuyCancel         = 18; //求购取消
      const Ecology           = 19; //生态节点奖励
      const Pledge            = 20; //存储服务费
+     const TeamLevel         = 21; //等级分佣
 
      /*
       * 支付状态
@@ -54,7 +55,8 @@ class LedgerTokenChangeModel extends Model
          self::Service           => '服务津贴',
          self::Together          => '共创津贴',
          self::Ecology           => '生态节点奖励',
-         self::Pledge            => '存储服务费'
+         self::Pledge            => '存储服务费',
+         self::TeamLevel         => '等级分佣',
      ];
 
            
@@ -82,6 +84,7 @@ class LedgerTokenChangeModel extends Model
             self::BuyCancel => __('求购取消'),
             self::Ecology => __('生态节点奖励'),
             self::Pledge => __('存储服务费'),
+            self::TeamLevel => __('等级分佣'),
            ];
     }
    

+ 13 - 6
application/common/model/LedgerWalletModel.php

@@ -160,16 +160,21 @@ class LedgerWalletModel extends Model
         if (empty($available)) throw new Exception('用户资产信息不存在');
         $walletUpdate = [];
         $result = false;
+        $token  = 0; //要扣除的茶宝
+        $frozen = 0; //要扣除的标记茶宝
         //运费/手续费:扣除
         if($icn == '-'){
             $totalAmount = bcadd($available['token'], $available['frozen'], 6);
             //扣除冻结金额
-            if($available['frozen'] > $amount) $walletUpdate['frozen']  = bcsub($available['frozen'], $amount, 6);
-            if($available['frozen'] <= $amount) {
+            if($available['frozen'] >= $amount) {
+                $walletUpdate['frozen'] = $frozen = bcsub($available['frozen'], $amount, 6);
+            }
+            if($available['frozen'] < $amount) {
+                $frozen = $available['frozen'];
                 $walletUpdate = ['token'=> bcadd($totalAmount, -$amount, 6), 'frozen' => 0];
-                //添加账变记录
-                $subAmount = bcsub($amount, $available['frozen'], 6);
-                if($subAmount > 0) $this->changeWalletAccount($uid, Asset::TOKEN, -$subAmount, LedgerTokenChangeModel::Giveaway, $from_id);
+                //添加茶宝账变记录
+                $subAmount = $token = bcsub($amount, $available['frozen'], 6);
+                $this->changeWalletAccount($uid, Asset::TOKEN, -$subAmount, LedgerTokenChangeModel::Giveaway, $from_id);
             }
             //添加冻结
             $newAmount = $walletUpdate['frozen'];
@@ -192,7 +197,7 @@ class LedgerWalletModel extends Model
         // 创建账变记录
         if (count($walletUpdate) > 0) $ledgerWalletModel->where('user_id', $uid)->update($walletUpdate);
         if($result){
-            return (new LedgerFrozenChangeModel())->insert([
+            (new LedgerFrozenChangeModel())->insert([
                 'user_id'        => $uid,
                 'from_id'        => $from_id,
                 'change_amount'  => $icn.$amount,
@@ -200,6 +205,8 @@ class LedgerWalletModel extends Model
                 'create_time'    => time(),
                 'action'         => $action
             ]);
+
+            return ['token' => $token, 'frozen' => $frozen];
         }
     }
 

+ 5 - 0
application/common/model/ProductPopular.php

@@ -42,6 +42,11 @@ class ProductPopular extends Model
         self::Normal            => '进行中'
     ];
 
+    //类型
+    const TypeSingle = 1; //单品
+    const TypeGroup = 2; //组合
+   
+
     //刷新库存状态: status 状态0未开始 1进行中 2已结束
     public static function setUpdateStatus()
     {   

+ 1 - 1
application/common/model/ProductTeac.php

@@ -59,7 +59,7 @@ class ProductTeac extends Model
             'fee'        => bcmul($total_price, $fee, 4),
             'frozen'     => $frozen,
         ]); 
-      
+
     }
 
 

+ 5 - 0
application/common/model/UserModel.php

@@ -83,6 +83,11 @@ class UserModel extends Model
         return self::where('id', $uid)->value("rwa_num");
     }
 
+    //获取用户团队等级
+    public static function getTeamLevelId(int $uid): int
+    {   
+        return self::where('id', $uid)->value("team_level_id");
+    }
     
     /**
      * RWA更新数据

+ 7 - 0
application/common/model/UserPledge.php

@@ -63,6 +63,13 @@ class UserPledge extends Model
         return $count;
     }
 
+    //获取用户组合存储数量
+    public static function getPledgeCount(int $user_id): int
+    {
+        return self::alias('a')->where('a.user_id', $user_id)
+        ->join('product_pledge b','a.pledge_id = b.id','left')
+        ->where('a.status', self::Ongoing)->where('b.type_id', ProductPopular::TypeGroup)->sum('num');
+    }
     //用户
     public function users()
     {

+ 5 - 3
application/common/model/UserTeac.php

@@ -25,18 +25,20 @@ class UserTeac extends Model
     ];
 
     //添加订单记录
-    public static function setUserCreateOrder(int $uid, int $tradeId, int $typeId, int $num, float $price, float $fee)
+    public static function setUserCreateOrder(int $uid, int $tradeId, int $typeId, int $num, float $price, float $fee): float
     {   
         $total_price = bcmul($price, $num, 4); //总价
-        return self::create([
+        $fees = bcmul($total_price, $fee, 4); //手续费
+        self::create([
             'user_id'       => $uid,
             'trade_id'      => $tradeId,
             'type_id'       => $typeId,
             'num'           => $num,
             'price'         => $price,
             'total_price'   => $total_price,
-            'fee'           => bcmul($total_price, $fee, 4)
+            'fee'           => $fees
         ]);
+        return $fees;
     }
     
     //用户 user_id

+ 10 - 0
application/config.php

@@ -384,6 +384,16 @@ return [
             4 => ['product_id'=>23, 'num'=>1], //翡翠地址”,空投价值18888茶宝“星火”RWA权益卡1张 product_id 23。
             5 => ['product_id'=>28, 'num'=>1]  //彩宝地址”,空投价值68888茶宝“始”RWA权益卡1张 product_id 28。
     ],
+    //团队等级收益条件
+    'team_level_where' => [
+        0 => ['direct'=>3,'num'=>1, 'level'=>3],  //1级:黄金地址等级3,组合*1 上级3层发放收益
+        1 => ['direct'=>7,'num'=>2, 'level'=>7],  //2级:直推7个V1,组合*2 上级7层发放收益
+        2 => ['direct'=>7,'num'=>3, 'level'=>13],  //3级:直推7个V2,组合*3 上级13层发放收益
+        3 => ['direct'=>5,'num'=>4, 'level'=>21],  //4级:直推5个V3,组合*4 上级21层发放收益
+        4 => ['direct'=>3,'num'=>5, 'level'=>31],  //5级:直推3个V4,组合*5 上级31层发放收益
+    ],
+    //团队等级收益
+    'team_level_inc' => 0.01,
     //优选茶权
     'best_cha' => [
         //横图1

+ 2 - 1
public/assets/js/backend/ledger/ledger_frozen_change.js

@@ -36,7 +36,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                 4: '转账收款',
                                 5: '系统调整',
                                 6: '兑换Rwa赠送',
-                                7: '生态节点'
+                                7: '生态节点',
+                                8: '等级分佣'
                             }, operate: 'FIND_IN_SET', formatter: Table.api.formatter.label
                         },
                     ]

+ 2 - 1
public/assets/js/backend/ledger/ledger_teac_change.js

@@ -42,7 +42,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                 '5': '取消出售',
                                 '6': 'Teac兑换',
                                 '7': '存储服务费',
-                                '9': '系统调整',
+                                '8': '等级分佣',
+                                '100': '系统调整',
                             }, operate: 'FIND_IN_SET', formatter: Table.api.formatter.label
                         },
                     ]

+ 1 - 0
public/assets/js/backend/ledger/ledger_token_change.js

@@ -54,6 +54,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                 18: '求购取消',
                                 19: '生态节点奖励',
                                 20: '存储服务费',
+                                21: '等级分佣',
                             }, operate: 'FIND_IN_SET', formatter: Table.api.formatter.label
                         },
                     ]

+ 6 - 2
public/assets/js/backend/user/user.js

@@ -35,8 +35,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
                         {
                             field: 'team_level_id', title: '团队等级', searchList: {
-                                '0': '金矿',
-                                '1': '股东',
+                                0: '-',
+                                1: 'V1',
+                                2: 'V2',
+                                3: 'V3',
+                                4: 'V4',
+                                5: 'V5',
                             }, operate: false, formatter: Table.api.formatter.label
                         },
                         {field: 'ledger_wallet.token', title: '茶宝', operate: false},