|
|
@@ -185,44 +185,44 @@ class BonusCalc extends BaseObject {
|
|
|
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();
|
|
|
- // }
|
|
|
+ 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);
|
|
|
+ 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);
|
|
|
@@ -236,12 +236,12 @@ class BonusCalc extends BaseObject {
|
|
|
echo('计算共享奖'.($this->_sysConfig['openGX']['VALUE']?'完成':'关闭').',耗时:' . round($t11 - $t9, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
$this->_updatePercent(68);
|
|
|
|
|
|
- // 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['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();
|
|
|
@@ -250,27 +250,27 @@ 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();
|
|
|
- // }
|
|
|
+ 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);
|
|
|
+ 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['openJXS']['VALUE']) {
|
|
|
+ $this->calcBonusStandard();
|
|
|
+ }
|
|
|
|
|
|
- // 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->calcBonusBsGL();
|
|
|
@@ -278,6 +278,7 @@ class BonusCalc extends BaseObject {
|
|
|
echo('计算蓝星管理奖'.($this->_sysConfig['openGL']['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);
|