feat : sts
This commit is contained in:
@@ -120,15 +120,16 @@ class RankTask
|
||||
->select([
|
||||
'admin_user.id',
|
||||
'chef.kitchen_id',
|
||||
'admin_user.city_id'
|
||||
]);
|
||||
})
|
||||
->get();
|
||||
if ($chefInfo->isEmpty()) throw new Exception(__CLASS__.'数据生成失败,获取厨师信息失败');
|
||||
$this->chefInfo = $chefInfo->toArray();
|
||||
|
||||
$kitchenIds = array_column($this->chefInfo, 'kitchen_id');
|
||||
$this->kitchenSiteList = $this->kitchenModel->whereIn('id',$kitchenIds)->pluck('city_id','id')->toArray();
|
||||
if (empty($this->kitchenSiteList)) throw new Exception(__CLASS__.'数据生成失败,获取厨房城市信息失败');
|
||||
// $kitchenIds = array_column($this->chefInfo, 'kitchen_id');
|
||||
// $this->kitchenSiteList = $this->kitchenModel->whereIn('id',$kitchenIds)->pluck('city_id','id')->toArray();
|
||||
// if (empty($this->kitchenSiteList)) throw new Exception(__CLASS__.'数据生成失败,获取厨房城市信息失败');
|
||||
|
||||
$this->buildChefEvaluationRankData();
|
||||
|
||||
@@ -165,7 +166,7 @@ class RankTask
|
||||
$this->insertData[] = [
|
||||
'chef_id' => $v->id,
|
||||
'kitchen_id' => $v->kitchen_id,
|
||||
'city_id' => $this->kitchenSiteList[$v->kitchen_id] ?? 0,
|
||||
'city_id' => $v->city_id,
|
||||
'time_key' => $this->thisWeekInfo['year'].$this->thisWeekInfo['week_number'],
|
||||
'board_type' => LeaderboardHistoryCode::TYPE_CHEF_SALE,
|
||||
'score' => $data[$v->id] ?? 0,
|
||||
@@ -181,7 +182,7 @@ class RankTask
|
||||
$this->insertData[] = [
|
||||
'chef_id' => $v->id,
|
||||
'kitchen_id' => $v->kitchen_id,
|
||||
'city_id' => $this->kitchenSiteList[$v->kitchen_id] ?? 0,
|
||||
'city_id' => $v->city_id,
|
||||
'time_key' => $this->thisWeekInfo['year'].$this->thisWeekInfo['week_number'],
|
||||
'board_type' => $type,
|
||||
'score' => 0,
|
||||
@@ -208,7 +209,7 @@ class RankTask
|
||||
$this->insertData[] = [
|
||||
'chef_id' => $v->id,
|
||||
'kitchen_id' => $v->kitchen_id,
|
||||
'city_id' => $this->kitchenSiteList[$v->kitchen_id] ?? 0,
|
||||
'city_id' => $v->city_id,
|
||||
'time_key' => $this->thisWeekInfo['year'].$this->thisWeekInfo['week_number'],
|
||||
'board_type' => LeaderboardHistoryCode::TYPE_CHEF_SCORE,
|
||||
'score' => $data[$v->id] ?? 0,
|
||||
|
||||
Reference in New Issue
Block a user