root il y a 3 ans
Parent
commit
b2ee87fb19
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      common/models/StorePerfLog.php

+ 2 - 2
common/models/StorePerfLog.php

@@ -64,7 +64,7 @@ class StorePerfLog extends \common\components\ActiveRecord
      */
     public static function addOrUpdate($periodNum, $calcMonth, $userId, $data, $appendPv = 0) {
         $info = StorePerfLog::findUseDbCalc()
-        ->select('ID')
+        ->select('ID,GRAND_TOTAL_PV')
         ->where('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM AND CALC_MONTH=:CALC_MONTH',
          [':USER_ID'=>$userId,':PERIOD_NUM' => $periodNum, ':CALC_MONTH' => $calcMonth]
         )
@@ -79,7 +79,7 @@ class StorePerfLog extends \common\components\ActiveRecord
             }
             if ($data['IS_STUDIO'] == 1) {
                 // 累加总PV
-                $totalPv = $data['GRAND_TOTAL_PV'] + $appendPv;
+                $totalPv = $info['GRAND_TOTAL_PV'] + $appendPv;
                 StorePerfLog::updateAll(['GRAND_TOTAL_PV' => $totalPv], 'ID=:ID', [':ID' => $info['ID']]);
             }
         }