root 3 éve
szülő
commit
db8247c0a8
1 módosított fájl, 3 hozzáadás és 6 törlés
  1. 3 6
      common/helpers/bonus/PerfCalc.php

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

@@ -1201,7 +1201,6 @@ class PerfCalc {
                 $userId = $everyData['USER_ID'];
                 $pv = $everyData['MONTH_PV'];
                 $userBaseInfo = CalcCache::getUserInfo($userId, $this->_periodNum);
-                $userRelation = CalcCache::getUserRelationInfo($userId, $this->_periodNum);
                 // 记录有业绩单的用户
                 StorePerfLog::addOrUpdate(
                     $this->_periodNum, 
@@ -1213,8 +1212,7 @@ class PerfCalc {
                         'MONTH_PV' => $pv,
                         'PERIOD_NUM' => $this->_periodNum,
                         'CALC_MONTH' => $this->_calcYearMonth,
-                        'CREATE_AT' => time(),
-                        'PARENT_UID' => ''
+                        'CREATE_AT' => time()
                     ],
                     $pv
                 );
@@ -1231,7 +1229,6 @@ class PerfCalc {
                     // 如果此用户不是店铺,继续上找到店铺并累加上去PV
                     $this->loopRelationParentDo($userId, function ($parent) use (&$everyData,&$allUser,&$studioUid) {
                         $parentUser = CalcCache::getUserInfo($parent['PARENT_UID'], $this->_periodNum);
-                        $userRelation = CalcCache::getUserRelationInfo($parent['PARENT_UID'], $this->_periodNum);
                         StorePerfLog::addOrUpdate(
                             $this->_periodNum, 
                             $this->_calcYearMonth, 
@@ -1242,8 +1239,7 @@ class PerfCalc {
                                 'MONTH_PV' => 0,
                                 'PERIOD_NUM' => $this->_periodNum,
                                 'CALC_MONTH' => $this->_calcYearMonth,
-                                'CREATE_AT' => time(),
-                                'PARENT_UID' => $userRelation['PARENT_UID']
+                                'CREATE_AT' => time()
                             ],
                             $everyData['MONTH_PV']
                         );
@@ -1259,6 +1255,7 @@ class PerfCalc {
                         
                         unset($parent);
                     });
+                    array_push($allUser, $userId);
                     StorePerfLog::stParendStudio($this->_periodNum,$this->_calcYearMonth, $allUser, $studioUid);
                 }
             }