|
|
@@ -171,9 +171,9 @@ class BonusCalc extends BaseObject {
|
|
|
$this->clearCalcTableData();
|
|
|
$t2 = microtime(true);
|
|
|
echo('初始化、清空缓存及相关数据表完成,耗时:' . round($t2 - $t1, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
- $this->_updatePercent(5);
|
|
|
- $t3 = microtime(true);
|
|
|
$this->_updatePercent(10);
|
|
|
+ $t3 = microtime(true);
|
|
|
+ $this->_updatePercent(20);
|
|
|
// 奖金部分
|
|
|
if($this->_sysConfig['openFW']['VALUE']) {
|
|
|
$this->calcBonusBDStepOne();
|
|
|
@@ -181,65 +181,65 @@ class BonusCalc extends BaseObject {
|
|
|
}
|
|
|
$t4 = microtime(true);
|
|
|
echo('计算服务奖'.($this->_sysConfig['openFW']['VALUE']?'完成':'关闭').',耗时:' . round($t4 - $t3, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
- $this->_updatePercent(15);
|
|
|
-
|
|
|
- if($this->_sysConfig['openTG']['VALUE']) {
|
|
|
- $this->calcBonusTG();
|
|
|
- }
|
|
|
- $t5 = microtime(true);
|
|
|
- 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['openTG']['VALUE']) {
|
|
|
+ // $this->calcBonusTG();
|
|
|
+ // }
|
|
|
+ // $t5 = microtime(true);
|
|
|
+ // 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();
|
|
|
- $this->calcBonusFxQY();
|
|
|
+ // $this->calcBonusBdQY();
|
|
|
+ // $this->calcBonusFxQY();
|
|
|
}
|
|
|
$t9 = microtime(true);
|
|
|
echo('计算团队奖'.($this->_sysConfig['openQY']['VALUE']?'完成':'关闭').',耗时:' . round($t9 - $t8, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
$this->_updatePercent(40);
|
|
|
|
|
|
- if($this->_sysConfig['openGX']['VALUE']) {
|
|
|
- $this->calcBonusGXBefore();
|
|
|
- $this->calcBonusGX();
|
|
|
- }
|
|
|
- $t11 = microtime(true);
|
|
|
- echo('计算共享奖'.($this->_sysConfig['openGX']['VALUE']?'完成':'关闭').',耗时:' . round($t11 - $t9, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
- $this->_updatePercent(45);
|
|
|
-
|
|
|
- if($this->_sysConfig['openGL']['VALUE']) {
|
|
|
- $this->calcBonusBdGL();
|
|
|
- }
|
|
|
- $t13 = microtime(true);
|
|
|
- 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['openGX']['VALUE']) {
|
|
|
+ // $this->calcBonusGXBefore();
|
|
|
+ // $this->calcBonusGX();
|
|
|
+ // }
|
|
|
+ // $t11 = microtime(true);
|
|
|
+ // echo('计算共享奖'.($this->_sysConfig['openGX']['VALUE']?'完成':'关闭').',耗时:' . round($t11 - $t9, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
+ // $this->_updatePercent(45);
|
|
|
+
|
|
|
+ // if($this->_sysConfig['openGL']['VALUE']) {
|
|
|
+ // $this->calcBonusBdGL();
|
|
|
+ // }
|
|
|
+ // $t13 = microtime(true);
|
|
|
+ // 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();
|
|
|
@@ -248,37 +248,37 @@ class BonusCalc extends BaseObject {
|
|
|
// 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();
|
|
|
- }
|
|
|
- $t16 = microtime(true);
|
|
|
- echo('计算荣衔奖'.($this->_sysConfig['openYC']['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();
|
|
|
- }
|
|
|
+ // if($this->_sysConfig['openYC']['VALUE']) {
|
|
|
+ // $this->calcBonusYCStepOne();
|
|
|
+ // $this->calcBonusYCStepTwo();
|
|
|
+ // }
|
|
|
+ // $t16 = microtime(true);
|
|
|
+ // echo('计算荣衔奖'.($this->_sysConfig['openYC']['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);
|
|
|
+ // echo('计算达标奖'.($this->_sysConfig['openJXS']['VALUE']?'完成':'关闭').',耗时:' . round($t18 - $t17, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
+ // $this->_updatePercent(65);
|
|
|
|
|
|
//把奖金会员写入缓存
|
|
|
$this->loopMonthBonusUserFromDbToCache();
|
|
|
$t19 = microtime(true);
|
|
|
echo('奖金会员写入缓存完成,耗时:' . round($t19 - $t18, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
- $this->_updatePercent(70);
|
|
|
+ $this->_updatePercent(50);
|
|
|
|
|
|
//奖金写库
|
|
|
$this->loopBonusUsers();
|
|
|
- $this->_updatePercent(75);
|
|
|
+ $this->_updatePercent(65);
|
|
|
unset($calcWrite);
|
|
|
$t20 = microtime(true);
|
|
|
echo('奖金写库操作完成,耗时:' . round($t20 - $t19, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
@@ -395,16 +395,16 @@ class BonusCalc extends BaseObject {
|
|
|
CalcBonus::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
|
|
|
CalcBonusQY::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
- CalcBonusBD::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
- CalcBonusTG::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
- CalcBonusYJ::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
- CalcBonusGX::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
- CalcBonusGL::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
+ // CalcBonusBD::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
+ // CalcBonusTG::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
+ // CalcBonusYJ::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
+ // CalcBonusGX::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
+ // CalcBonusGL::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
// 月结时要清空的数据
|
|
|
if ($this->_isCalcMonth) {
|
|
|
- CalcBonusYC::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
- CalcBonusVIP::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
- CalcBonusStandard::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
+ // CalcBonusYC::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
+ // CalcBonusVIP::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
+ // CalcBonusStandard::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
ScoreMonth::pageDeleteAll('PERIOD_NUM='.$this->_periodNum);
|
|
|
}
|
|
|
}
|