root před 3 roky
rodič
revize
2c85ebace6
2 změnil soubory, kde provedl 0 přidání a 90 odebrání
  1. 0 35
      common/helpers/bonus/BonusCalc.php
  2. 0 55
      common/models/GxlimitLog.php

+ 0 - 35
common/helpers/bonus/BonusCalc.php

@@ -44,7 +44,6 @@ use common\models\DeclarationLevel;
 use common\models\DecOrder;
 use common\models\EmployLevel;
 use common\models\FlowBonus;
-use common\models\GxlimitLog;
 use common\models\PerfActiveUser;
 use common\models\ScoreMonth;
 use common\models\User;
@@ -1519,17 +1518,6 @@ class BonusCalc extends BaseObject {
                                 'bonus' => $shareBonusTwo,
                                 'validMinPv' => true,
                             ];
-                            // 增加分享log-----------------------
-                            $gxLimitModel = new GxlimitLog();
-                            $gxLimitModel->NOW_SHARE_TIMES = $shareTimes; // 当前分享得第几次
-                            $gxLimitModel->SHARE_USER_ID = $userId; // 分享奖励者用户ID
-                            $gxLimitModel->WINNER_USER_ID = $parent['PARENT_UID'];// 活得共享奖励者ID
-                            $gxLimitModel->SHARE_TYPE = 1; //得奖类型  1为向下找五次记录  2为得共享奖金记录(过滤掉未满足)
-                            $gxLimitModel->ADD_TIME = date('Y-m-d H:i:s', time());
-                            $gxLimitModel->AMOUNT = $shareBonusTwo;
-                            $gxLimitModel->ORI_AMOUNT = $shareBonusTwo;
-                            $gxLimitModel->save();
-                            // 增加分享log-----------------------
                         }
                         //判断$parent是否有首单团队奖
                         $parentBonus = CalcCache::bonus($parent['PARENT_UID'], $this->_periodNum);
@@ -1574,17 +1562,6 @@ class BonusCalc extends BaseObject {
 
                     //扣除相应的复消积分和管理费
                     $deductData = $this->deduct($bonusUserId, $bonus);
-                    // 增加分享log-----------------------
-                    $gxLimitModel = new GxlimitLog();
-                    $gxLimitModel->NOW_SHARE_TIMES = 0; // 当前分享得第几次
-                    $gxLimitModel->SHARE_USER_ID = $userId; // 分享奖励者用户ID
-                    $gxLimitModel->WINNER_USER_ID = $bonusUserId;// 活得共享奖励者ID
-                    $gxLimitModel->SHARE_TYPE = 2; //得奖类型  1为向下找五次记录  2为得共享奖金记录(过滤掉未满足)
-                    $gxLimitModel->ADD_TIME = date('Y-m-d H:i:s', time());
-                    $gxLimitModel->AMOUNT = $deductData['surplus'];
-                    $gxLimitModel->ORI_AMOUNT = $bonus;
-                    $gxLimitModel->save();
-                    // 增加分享log-----------------------
 
                     CalcCache::bonus($bonusUserId, $this->_periodNum, 'BONUS_GX', $bonus, $deductData);
                     CalcCache::addHasMonthBonusUsers($bonusUserId, $this->_periodNum);
@@ -2404,18 +2381,6 @@ class BonusCalc extends BaseObject {
                 'validMinPv' => false
 
             ];
-
-            // 增加分享log-----------------------
-            $gxLimitModel = new GxlimitLog();
-            $gxLimitModel->NOW_SHARE_TIMES = 99; // 当前分享得第几次
-            $gxLimitModel->SHARE_USER_ID = $userId; // 分享奖励者用户ID
-            $gxLimitModel->WINNER_USER_ID = $everyData['bonusUserId'];// 活得共享奖励者ID
-            $gxLimitModel->SHARE_TYPE = 3; //得奖类型  1为向下找五次记录  2为得共享奖金记录(过滤掉未满足) 3为向上2次
-            $gxLimitModel->ADD_TIME = date('Y-m-d H:i:s', time());
-            $gxLimitModel->AMOUNT = $shareBonusOne * $everyData['bonusUserPerf'] / $bonusUserTotalPerf;
-            $gxLimitModel->ORI_AMOUNT = $shareBonusOne * $everyData['bonusUserPerf'] / $bonusUserTotalPerf;
-            $gxLimitModel->save();
-            // 增加分享log-----------------------
             
             unset($everyData);
         }

+ 0 - 55
common/models/GxlimitLog.php

@@ -1,55 +0,0 @@
-<?php
-
-namespace common\models;
-
-use Yii;
-
-/**
- * This is the model class for table "{{%GXLIMIT_LOG}}".
- *
- * @property string $ID 主键
- * @property string $NOW_SHARE_TIMES 当前分享得第几次
- * @property string $SHARE_USER_ID 分享奖励者用户ID
- * @property string $WINNER_USER_ID 活得共享奖励者ID
- * @property string $SHARE_TYPE 得奖类型  1为向下找五次记录        2为上和下一起有报单团队奖金得用户
- * @property string $ADD_TIME 添加时间
- * @property string $AMOUNT 实得奖金
- * @property string $ORI_AMOUNT 原奖金
- */
-class GxlimitLog extends \common\components\ActiveRecord
-{
-    /**
-     * {@inheritdoc}
-     */
-    public static function tableName()
-    {
-        return '{{%GXLIMIT_LOG}}';
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function rules()
-    {
-        return [
-            
-        ];
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function attributeLabels()
-    {
-        return [
-            'ID' => '主键ID',
-            'NOW_SHARE_TIMES' => '当前分享得第几次',
-            'SHARE_USER_ID' => '分享奖励者用户ID',
-            'WINNER_USER_ID' => '活得共享奖励者ID',
-            'SHARE_TYPE' => '得奖类型  1为向下找五次记录        2为上和下一起有报单团队奖金得用户',
-            'ADD_TIME' => '添加时间',
-            'AMOUNT' => '实得奖金',
-            'ORI_AMOUNT' => '原奖金'
-        ];
-    }
-}