root 3 år sedan
förälder
incheckning
6f1d24999b
1 ändrade filer med 3 tillägg och 6 borttagningar
  1. 3 6
      common/helpers/bonus/PreparePerfCalc.php

+ 3 - 6
common/helpers/bonus/PreparePerfCalc.php

@@ -278,7 +278,9 @@ class PreparePerfCalc {
     public function initCalcTask($periodNum = null) {
         $periodObj = Period::instance();
         $periodDataArr = $periodObj->setPeriodNum($periodNum);
-        $this->_lastTime = $periodDataArr['END_TIME']; 
+        // 限制订单的时间:如果是定时器,则固定为每周日的0点. 如果是手动执行,则是进行异步代码的时间
+        // 这里直接使用后台生成业绩单的时间
+        $this->_lastTime = empty($periodNum)? $periodDataArr['END_TIME'] - 86399: $periodDataArr['END_TIME']; 
         $this->_periodNum = $periodDataArr['PERIOD_NUM'];
         $this->_sysConfig = Cache::getSystemConfig();
         $this->_decLevelConfig = Cache::getDecLevelConfig();
@@ -305,11 +307,6 @@ class PreparePerfCalc {
             $this->_lastPeriodYearMonth = 0;
         }
         $this->_pvRatio = $this->_sysConfig['pvRatio']['VALUE'];
-        // 限制订单的时间:如果是定时器,则固定为每周日的0点. 如果是手动执行,则是进行异步代码的时间
-        // 这里直接使用后台生成业绩单的时间
-        if (empty($periodNum)) {
-            $this->_lastTime = $this->_lastTime-86399;
-        }
     }
 
     /**