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