|
|
@@ -44,6 +44,7 @@ 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;
|
|
|
@@ -1518,6 +1519,17 @@ 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);
|
|
|
@@ -1562,6 +1574,17 @@ 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);
|