|
|
@@ -198,33 +198,7 @@ class BonusCalc extends BaseObject {
|
|
|
echo('计算推广奖'.($this->_sysConfig['openTG']['VALUE']?'完成':'关闭').',耗时:' . round($t5 - $t4, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
$this->_updatePercent(20);
|
|
|
|
|
|
- if($this->_sysConfig['openXF']['VALUE']) {
|
|
|
- if( $this->_sysConfig['consumeRecPercent']['VALUE'] > 0 ) {
|
|
|
- $this->calcBonusXFToRec();
|
|
|
- }
|
|
|
- if( $this->_sysConfig['consumeSelfPercent']['VALUE'] > 0 ) {
|
|
|
- $this->calcBonusXFToSelf();
|
|
|
- }
|
|
|
- }
|
|
|
- $t6 = microtime(true);
|
|
|
- echo('计算消费奖'.($this->_sysConfig['openXF']['VALUE']?'完成':'关闭').',耗时:' . round($t6 - $t5, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
- $this->_updatePercent(25);
|
|
|
-
|
|
|
- if($this->_sysConfig['openYJ']['VALUE']) {
|
|
|
- $this->calcBonusBdYJ();
|
|
|
- }
|
|
|
- $t7 = microtime(true);
|
|
|
- echo('计算报单业绩奖'.($this->_sysConfig['openYJ']['VALUE']?'完成':'关闭').',耗时:' . round($t7 - $t6, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
- $this->_updatePercent(30);
|
|
|
-
|
|
|
- if($this->_sysConfig['fxOpenYJ']['VALUE']) {
|
|
|
- $this->calcBonusFxYJ();
|
|
|
- }
|
|
|
$t8 = microtime(true);
|
|
|
- echo('计算复消业绩奖'.($this->_sysConfig['fxOpenYJ']['VALUE']?'完成':'关闭').',耗时:' . round($t8 - $t7, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
- $this->_updatePercent(35);
|
|
|
-
|
|
|
-
|
|
|
if($this->_sysConfig['openQY']['VALUE']) {
|
|
|
$this->calcBonusQY();
|
|
|
$this->calcBonusBdQY();
|
|
|
@@ -249,19 +223,6 @@ class BonusCalc extends BaseObject {
|
|
|
echo('计算报单管理奖'.($this->_sysConfig['openGL']['VALUE']?'完成':'关闭').',耗时:' . round($t13 - $t11, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
$this->_updatePercent(50);
|
|
|
|
|
|
-// if($this->_sysConfig['fxOpenGL']['VALUE']) {
|
|
|
-// $this->calcBonusFxGL();
|
|
|
-// }
|
|
|
-// $t14 = microtime(true);
|
|
|
-// echo('计算复消管理奖'.($this->_sysConfig['fxOpenGL']['VALUE']?'完成':'关闭').',耗时:' . round($t14 - $t13, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
-// $this->_updatePercent(70);
|
|
|
-
|
|
|
-
|
|
|
- // if($this->_sysConfig['openYC']['VALUE']) {
|
|
|
- // $this->calcBonusYCStepOne();
|
|
|
- // $this->calcBonusYCStepTwo();
|
|
|
- // }
|
|
|
-
|
|
|
// 计算店服务奖 月奖
|
|
|
if($this->_sysConfig['openStore']['VALUE']) {
|
|
|
if ($this->_sysConfig['openStoreReduce']['VALUE']) {
|
|
|
@@ -276,20 +237,7 @@ class BonusCalc extends BaseObject {
|
|
|
echo('计算店服务奖金'.($this->_sysConfig['openStore']['VALUE']?'完成':'关闭').',耗时:' . round($t16 - $t13, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
$this->_updatePercent(55);
|
|
|
|
|
|
- if($this->_sysConfig['openVIP']['VALUE']) {
|
|
|
- $this->calcBonusVIP();
|
|
|
- }
|
|
|
$t17 = microtime(true);
|
|
|
- echo('计算VIP奖'.($this->_sysConfig['openVIP']['VALUE']?'完成':'关闭').',耗时:' . round($t17 - $t16, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
- $this->_updatePercent(60);
|
|
|
-
|
|
|
- if($this->_sysConfig['openJXS']['VALUE']) {
|
|
|
- $this->calcBonusStandard();
|
|
|
- }
|
|
|
- $t18 = microtime(true);
|
|
|
- echo('计算达标奖'.($this->_sysConfig['openJXS']['VALUE']?'完成':'关闭').',耗时:' . round($t18 - $t17, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
- $this->_updatePercent(65);
|
|
|
-
|
|
|
// 蓝星奖入库,实际上是插入有奖金会员数据缓存中.
|
|
|
// 调用存储过程,计算蓝星管理奖金
|
|
|
$this->calcBsProcedure();
|
|
|
@@ -297,8 +245,8 @@ class BonusCalc extends BaseObject {
|
|
|
$this->calcBonusBsGL();
|
|
|
$this->calcBonusBsGLCF();
|
|
|
$this->calcBonusBsYJCF();
|
|
|
- $t18temp = microtime(true);
|
|
|
- echo('计算蓝星管理奖'.($this->_sysConfig['openGL']['VALUE']?'完成':'关闭').',耗时:' . round($t18temp - $t18, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
+ $t18 = microtime(true);
|
|
|
+ echo('计算蓝星管理奖'.($this->_sysConfig['openGL']['VALUE']?'完成':'关闭').',耗时:' . round($t18 - $t17, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
$this->_updatePercent(65);
|
|
|
|
|
|
//把奖金会员写入缓存
|
|
|
@@ -311,7 +259,7 @@ class BonusCalc extends BaseObject {
|
|
|
$this->loopBonusUsers();
|
|
|
// 入库完成,将各个奖金计算流水会员聘级,更新成蓝星奖当时计算的聘级
|
|
|
$this->loopCalcBlueEmpLv();
|
|
|
- $this->_updatePercent(75);
|
|
|
+ $this->_updatePercent(85);
|
|
|
unset($calcWrite);
|
|
|
$t20 = microtime(true);
|
|
|
echo('奖金写库操作完成,耗时:' . round($t20 - $t19, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
@@ -320,21 +268,7 @@ class BonusCalc extends BaseObject {
|
|
|
$this->loopMonthBonusUserToDb();
|
|
|
$t21 = microtime(true);
|
|
|
echo('奖金会员入库完成,耗时:' . round($t21 - $t20, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
- $this->_updatePercent(80);
|
|
|
-
|
|
|
- // 计算基础积分,不可以奖金入库之前计算这样可能会丢掉只有本期的奖金的会员
|
|
|
- $this->calcBaseScore();
|
|
|
- $this->_updatePercent(90);
|
|
|
- $t22 = microtime(true);
|
|
|
- echo('计算基础积分,耗时:' . round($t22 - $t21, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
-
|
|
|
- //积分入库
|
|
|
- $this->loopWriteScore();
|
|
|
$this->_updatePercent(100);
|
|
|
- $t23 = microtime(true);
|
|
|
- echo('积分写库操作完成,耗时:' . round($t23 - $t22, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
-
|
|
|
- //@todo 计算房产奖
|
|
|
|
|
|
$t30 = microtime(true);
|
|
|
echo('结算全部完成,共耗时:' . round($t30 - $t1, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
@@ -509,11 +443,6 @@ class BonusCalc extends BaseObject {
|
|
|
'decPercentConfig' => $this->_sysConfig['decPercent']['VALUE'],
|
|
|
'recNum' => $bonusUserInfo['REC_NUM'],
|
|
|
'decAmount' => $bonusUserInfo['ZC_AMOUNT'],
|
|
|
- 'bonusTotalLimit' => [
|
|
|
- $this->_sysConfig['bonusTotalZeroLimit']['VALUE'],
|
|
|
- $this->_sysConfig['bonusTotalOneLimit']['VALUE'],
|
|
|
- $this->_sysConfig['bonusTotalTwoLimit']['VALUE'],
|
|
|
- ],
|
|
|
]),
|
|
|
];
|
|
|
|
|
|
@@ -597,11 +526,6 @@ class BonusCalc extends BaseObject {
|
|
|
'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'],
|
|
|
- ],
|
|
|
]),
|
|
|
];
|
|
|
|
|
|
@@ -685,11 +609,6 @@ class BonusCalc extends BaseObject {
|
|
|
'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'],
|
|
|
- ],
|
|
|
]),
|
|
|
];
|
|
|
|
|
|
@@ -773,11 +692,6 @@ class BonusCalc extends BaseObject {
|
|
|
'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'],
|
|
|
- ],
|
|
|
]),
|
|
|
];
|
|
|
|
|
|
@@ -1189,11 +1103,6 @@ class BonusCalc extends BaseObject {
|
|
|
'recNum' => $bonusUserBaseInfo['REC_NUM'],
|
|
|
'decAmount' => $bonusUserBaseInfo['ZC_AMOUNT'],
|
|
|
'decLevel' => $bonusUserBaseInfo['DEC_LV'],
|
|
|
- 'bonusTotalLimit' => [
|
|
|
- $this->_sysConfig['bonusTotalZeroLimit']['VALUE'],
|
|
|
- $this->_sysConfig['bonusTotalOneLimit']['VALUE'],
|
|
|
- $this->_sysConfig['bonusTotalTwoLimit']['VALUE'],
|
|
|
- ],
|
|
|
]),
|
|
|
];
|
|
|
|
|
|
@@ -1307,11 +1216,6 @@ class BonusCalc extends BaseObject {
|
|
|
'recNum' => $bonusUserBaseInfo['REC_NUM'],
|
|
|
'decAmount' => $bonusUserBaseInfo['ZC_AMOUNT'],
|
|
|
'decLevel' => $bonusUserBaseInfo['DEC_LV'],
|
|
|
- 'bonusTotalLimit' => [
|
|
|
- $this->_sysConfig['bonusTotalZeroLimit']['VALUE'],
|
|
|
- $this->_sysConfig['bonusTotalOneLimit']['VALUE'],
|
|
|
- $this->_sysConfig['bonusTotalTwoLimit']['VALUE'],
|
|
|
- ],
|
|
|
]),
|
|
|
];
|
|
|
|
|
|
@@ -1768,11 +1672,6 @@ class BonusCalc extends BaseObject {
|
|
|
'incomeBonus' => $incomeBonus,
|
|
|
'recNum' => $userBaseInfo['REC_NUM'],
|
|
|
'decAmount' => $userBaseInfo['ZC_AMOUNT'],
|
|
|
- 'bonusTotalLimit' => [
|
|
|
- $this->_sysConfig['bonusTotalZeroLimit']['VALUE'],
|
|
|
- $this->_sysConfig['bonusTotalOneLimit']['VALUE'],
|
|
|
- $this->_sysConfig['bonusTotalTwoLimit']['VALUE'],
|
|
|
- ],
|
|
|
]),
|
|
|
];
|
|
|
|
|
|
@@ -2073,11 +1972,6 @@ class BonusCalc extends BaseObject {
|
|
|
'decAmount' => $bonusUserBaseInfo['ZC_AMOUNT'],
|
|
|
'fromUserId' => $userId,
|
|
|
'decLevel' => $bonusUserBaseInfo['DEC_LV'],
|
|
|
- 'bonusTotalLimit' => [
|
|
|
- $this->_sysConfig['bonusTotalZeroLimit']['VALUE'],
|
|
|
- $this->_sysConfig['bonusTotalOneLimit']['VALUE'],
|
|
|
- $this->_sysConfig['bonusTotalTwoLimit']['VALUE'],
|
|
|
- ],
|
|
|
]),
|
|
|
];
|
|
|
|
|
|
@@ -2208,11 +2102,6 @@ class BonusCalc extends BaseObject {
|
|
|
'decAmount' => $bonusUserBaseInfo['ZC_AMOUNT'],
|
|
|
'fromUserId' => $userId,
|
|
|
'decLevel' => $bonusUserBaseInfo['DEC_LV'],
|
|
|
- 'bonusTotalLimit' => [
|
|
|
- $this->_sysConfig['bonusTotalZeroLimit']['VALUE'],
|
|
|
- $this->_sysConfig['bonusTotalOneLimit']['VALUE'],
|
|
|
- $this->_sysConfig['bonusTotalTwoLimit']['VALUE'],
|
|
|
- ],
|
|
|
]),
|
|
|
];
|
|
|
|