|
|
@@ -1214,7 +1214,7 @@ class PerfCalc {
|
|
|
'PERIOD_NUM' => $this->_periodNum,
|
|
|
'CALC_MONTH' => $this->_calcYearMonth,
|
|
|
'CREATE_AT' => time(),
|
|
|
- 'PARENT_UID' => $userRelation['PARENT_UID']
|
|
|
+ 'PARENT_UID' => ''
|
|
|
],
|
|
|
$pv
|
|
|
);
|
|
|
@@ -1224,9 +1224,12 @@ class PerfCalc {
|
|
|
CalcCache::nowPeriodPerf($userId, $this->_periodNum, [
|
|
|
'STORE_PV_GRAND' => $pv,
|
|
|
]);
|
|
|
+ StorePerfLog::stParendStudio($this->_periodNum,$this->_calcYearMonth, [$userId], $userId);
|
|
|
} else {
|
|
|
+ $allUser = [];
|
|
|
+ $studioUid = '';
|
|
|
// 如果此用户不是店铺,继续上找到店铺并累加上去PV
|
|
|
- $this->loopRelationParentDo($userId, function ($parent) use (&$everyData) {
|
|
|
+ $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(
|
|
|
@@ -1244,17 +1247,19 @@ class PerfCalc {
|
|
|
],
|
|
|
$everyData['MONTH_PV']
|
|
|
);
|
|
|
+ array_push($allUser, $parent['PARENT_UID']);
|
|
|
if ($parentUser['IS_STUDIO']) {
|
|
|
CalcCache::nowPeriodPerf($parent['PARENT_UID'], $this->_periodNum, [
|
|
|
'STORE_PV_GRAND' => $everyData['MONTH_PV']
|
|
|
]);
|
|
|
CalcCache::addHasPerfUsers($parent['PARENT_UID'], $this->_periodNum);
|
|
|
-
|
|
|
+ $studioUid = $parent['PARENT_UID'];
|
|
|
return self::LOOP_FINISH;
|
|
|
}
|
|
|
|
|
|
unset($parent);
|
|
|
});
|
|
|
+ StorePerfLog::stParendStudio($this->_periodNum,$this->_calcYearMonth, $allUser, $studioUid);
|
|
|
}
|
|
|
}
|
|
|
unset($allData);
|