root 3 anni fa
parent
commit
b33031b505
2 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 6 1
      common/helpers/bonus/BonusCalc.php
  2. 0 0
      common/models/StorePerfLog.php

+ 6 - 1
common/helpers/bonus/BonusCalc.php

@@ -260,7 +260,7 @@ class BonusCalc extends BaseObject {
             //     $this->calcBonusYCStepTwo();
             // }
 
-            // 计算店服务奖
+            // 计算店服务奖 月奖
             $this->calcStoreBonus();
             $t16 = microtime(true);
             echo('计算店服务奖金'.($this->_sysConfig['openYC']['VALUE']?'完成':'关闭').',耗时:' . round($t16 - $t13, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
@@ -926,6 +926,11 @@ class BonusCalc extends BaseObject {
     }
 
     public function calcStoreBonus(int $offset = 0) {
+        if( !$this->_isCalcMonth ) {
+            // 不是结算月,则不进行计算
+            echo sprintf("时间:[%s]店服务奖金非月节点,不进行计算,当前offset为:【%s】" . PHP_EOL, date('Y-m-d H:i:s', time()) , $offset);
+            return false;
+        }
         echo sprintf("时间:[%s]店服务奖金计算,当前offset为:【%s】" . PHP_EOL, date('Y-m-d H:i:s', time()) , $offset);
         $allData = CalcCache::getHasPerfUsers($this->_periodNum, $offset, $this->_limit);
         if ($allData) {

+ 0 - 0
common/models/StorePerfLog.php