|
|
@@ -334,10 +334,11 @@ class CalcServeBonusCalc extends BaseObject {
|
|
|
// 获取会员的报单级别
|
|
|
$userBaseInfo = CalcCache::getUserInfo($bonusUserId, $this->_periodNum);
|
|
|
|
|
|
- //扣除相应的复消积分和管理费
|
|
|
- $deductData = $this->deduct($bonusUserId, $recBonus);
|
|
|
-
|
|
|
- CalcCache::bonus($bonusUserId, $periodNum, 'BONUS_TG', $recBonus, $deductData);
|
|
|
+ // 最后统一扣除管理费和复消积分
|
|
|
+ CalcCache::bonus($bonusUserId, $this->_periodNum, 'BONUS_TG', $recBonus);
|
|
|
+ // 扣除相应的复消积分和管理费
|
|
|
+ // $deductData = $this->deduct($bonusUserId, $recBonus);
|
|
|
+ // CalcCache::bonus($bonusUserId, $periodNum, 'BONUS_TG', $recBonus, $deductData);
|
|
|
|
|
|
//来源会员信息
|
|
|
$fromUserInfo = CalcCache::getUserInfo($userId, $this->_periodNum);
|
|
|
@@ -352,10 +353,7 @@ class CalcServeBonusCalc extends BaseObject {
|
|
|
'LAST_FROM_DEC_LV' => $fromUserInfo['DEC_LV'],
|
|
|
'LAST_FROM_EMP_LV' => $fromUserInfo['EMP_LV'],
|
|
|
'LAST_FROM_STATUS' => $fromUserInfo['STATUS'],
|
|
|
- 'AMOUNT' => $deductData['surplus'],
|
|
|
'ORI_BONUS' => $recBonus,
|
|
|
- 'RECONSUME_POINTS' => $deductData['reConsumePoints'],
|
|
|
- 'MANAGE_TAX' => $deductData['manageTax'],
|
|
|
'PERIOD_NUM' => $this->_periodNum,
|
|
|
'CALC_YEAR' => $this->_calcYear,
|
|
|
'CALC_MONTH' => $this->_calcYearMonth,
|
|
|
@@ -363,14 +361,7 @@ class CalcServeBonusCalc extends BaseObject {
|
|
|
'LOGS' => json_encode([
|
|
|
'perfPv' => $perfPv,
|
|
|
'recPercentConfig' => $this->_sysConfig['recPercent']['VALUE'],
|
|
|
- 'recNum' => $userBaseInfo['REC_NUM'],
|
|
|
- 'decAmount' => $userBaseInfo['ZC_AMOUNT'],
|
|
|
'decLevel' => $userBaseInfo['DEC_LV'],
|
|
|
- 'bonusTotalLimit' => [
|
|
|
- $this->_sysConfig['bonusTotalZeroLimit']['VALUE'],
|
|
|
- $this->_sysConfig['bonusTotalOneLimit']['VALUE'],
|
|
|
- $this->_sysConfig['bonusTotalTwoLimit']['VALUE'],
|
|
|
- ],
|
|
|
]),
|
|
|
];
|
|
|
|
|
|
@@ -573,11 +564,10 @@ class CalcServeBonusCalc extends BaseObject {
|
|
|
// 将封顶前的金额加入用户奖金缓存中,此金额不能发放(总奖金,总实际奖金)
|
|
|
CalcCache::bonus($userId, $periodNum, 'CAPPED_BONUS_QY', $capBonusQy);
|
|
|
|
|
|
- //扣除相应的复消积分和管理费
|
|
|
- $deductData = $this->deduct($userId, $teamBonus);
|
|
|
-
|
|
|
- // 把对碰后的奖金存入缓存中
|
|
|
- CalcCache::bonus($userId, $periodNum, 'BONUS_QY', $teamBonus, $deductData);
|
|
|
+ CalcCache::bonus($userId, $periodNum, 'BONUS_QY', $teamBonus);
|
|
|
+ // //扣除相应的复消积分和管理费 --- 最后统一扣除管理费和复消积分
|
|
|
+ // $deductData = $this->deduct($userId, $teamBonus);
|
|
|
+ // CalcCache::bonus($userId, $periodNum, 'BONUS_QY', $teamBonus, $deductData);
|
|
|
|
|
|
// TODO:取小腿值
|
|
|
$payLeg = min([$perfArr['SURPLUS_1L'], $perfArr['SURPLUS_2L']]);
|
|
|
@@ -595,10 +585,7 @@ class CalcServeBonusCalc extends BaseObject {
|
|
|
'LAST_EMP_LV' => $userBaseInfo['LAST_EMP_LV'],
|
|
|
'LAST_CROWN_LV' => $starCrown['ID'],
|
|
|
'LAST_STATUS' => $userBaseInfo['STATUS'],
|
|
|
- 'AMOUNT' => $deductData['surplus'],
|
|
|
'ORI_BONUS' => $teamBonus,
|
|
|
- 'RECONSUME_POINTS' => $deductData['reConsumePoints'],
|
|
|
- 'MANAGE_TAX' => $deductData['manageTax'],
|
|
|
'PERIOD_NUM' => $this->_periodNum,
|
|
|
'CALC_YEAR' => $this->_calcYear,
|
|
|
'CALC_MONTH' => $this->_calcYearMonth,
|