Explorar el Código

定时预计算,增加判断月结点

theo hace 3 años
padre
commit
05165a909d
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      common/helpers/bonus/Calc/CalcConsole.php

+ 4 - 1
common/helpers/bonus/Calc/CalcConsole.php

@@ -121,7 +121,10 @@ class CalcConsole extends BaseBusiness
         $nowTs = time();
         $currentPeriod = Period::find()->where('START_TIME< :NOW_TIME',['NOW_TIME'=>$nowTs])->where('END_TIME>= :NOW_TIME',['NOW_TIME'=>$nowTs-6])->asArray()->one();
         $periodNum = $currentPeriod['PERIOD_NUM'];
-        if (Period::isProcessing($periodNum)) {
+        if (
+            Period::isProcessing($periodNum)
+            || $currentPeriod['IS_MONTH'] == 0
+        ) {
             return;
         }
         if($nowTs+86400>$currentPeriod['END_TIME'] ){