|
|
@@ -273,6 +273,9 @@ class BonusCalc extends BaseObject {
|
|
|
$this->_updatePercent(65);
|
|
|
|
|
|
// 蓝星奖入库,实际上是插入有奖金会员数据缓存中.
|
|
|
+ // 调用存储过程,计算蓝星管理奖金
|
|
|
+ $this->calcBsProcedure();
|
|
|
+ // 将有蓝星管理奖金的用户加入到有奖金缓存用户中
|
|
|
$this->calcBonusBsGL();
|
|
|
$t18temp = microtime(true);
|
|
|
echo('计算蓝星管理奖'.($this->_sysConfig['openGL']['VALUE']?'完成':'关闭').',耗时:' . round($t18temp - $t18, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
@@ -1575,6 +1578,19 @@ class BonusCalc extends BaseObject {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ // 执行蓝星管理奖金的存储过程
|
|
|
+ public function calcBsProcedure() {
|
|
|
+ if( !$this->_isCalcMonth ) {
|
|
|
+ // 不是结算月,则不进行计算
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $result = \Yii::$app->db->createCommand("CALL CalcBlue(:periodNum)")
|
|
|
+ ->bindValue(':periodNum' , $this->_periodNum )
|
|
|
+ ->execute();
|
|
|
+
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 蓝星管理奖金
|
|
|
* @param int $offset
|