brook 3 éve
szülő
commit
4b0bc168ac

+ 1 - 1
common/components/SwooleAsyncTimer.php

@@ -52,7 +52,7 @@ class SwooleAsyncTimer extends SwooleAsyncTimerComponent implements SocketInterf
         // 自动执行任务队列中的任务
         Queue::instance()->consumeTask();
         // 实时监听计算系统修改的period表字段
-//        CalcConsole::listenCalcPeriod();
+        CalcConsole::listenCalcPeriod();
         CalcConsole::listenAutoPerfPeriod();
         return true;
     }

+ 2 - 2
common/helpers/bonus/Calc/PullCalcBonusData.php

@@ -304,7 +304,7 @@ class PullCalcBonusData extends BaseBusiness
                     $param = $info['param_name'];
                     $res   = self::pageDeleteAll($info['table'], $info['condition_field'] . '=' . $this->$param);
                 } else if (isset($info['condition_type']) && $info['condition_type'] == 'custom' && $info['condition'] == 'group') {
-                    $res = self::pageDeleteAll($info['table'], "CALC_MONTH = $this->_calcMonth and CALC_YEAR=$this->_calcYear")->queryAll();
+                    $res = self::pageDeleteAll($info['table'], "CALC_MONTH = $this->_calcMonth and CALC_YEAR=$this->_calcYear");
                 } else {
                     $res = self::pageDeleteAll($info['table'], 'PERIOD_NUM=' . $this->_periodNum);
                 }
@@ -342,7 +342,7 @@ class PullCalcBonusData extends BaseBusiness
         $limit = 10000;
         $sql   = sprintf('DELETE FROM %s WHERE %s LIMIT %d', $table, $where, $limit);
         try {
-            $affectRow = Yii::$app->db->createCommand($sql)->execute();
+            $affectRow = \Yii::$app->db->createCommand($sql)->execute();
         } catch (\Exception $e) {
             return false;
         }

+ 0 - 8
common/models/Order.php

@@ -163,14 +163,6 @@ class Order extends \common\components\ActiveRecord
         return $orders;
     }
 
-    /*
-     * 通过 期数和用户ID
-     * 查询当期订单
-     */
-    public static function fetchOrderCurrentPeriod($periodNum, $userId){
-        $orders = Order::find()->where("USER_ID = :USER_ID AND PERIOD_NUM = :PERIOD_NUM", [':USER_ID' => $userId,':PERIOD_NUM' => $periodNum]);
-        return $orders;
-    }
     public function getRecName()
     {
         return $this->hasOne(UserInfo::class, ['USER_ID' => 'USER_ID']);