feat : sts

This commit is contained in:
2025-06-11 10:56:44 +08:00
parent a4ad14c823
commit a7a5093c34

View File

@@ -131,7 +131,11 @@ class RankTaskService
->groupBy('chef_id') ->groupBy('chef_id')
->get(); ->get();
if ($data->isEmpty()) $this->buildChefStatementNullData(LeaderboardHistoryCode::TYPE_CHEF_SALE); if ($data->isEmpty()) {
$this->buildChefStatementNullData(LeaderboardHistoryCode::TYPE_CHEF_SALE);
return;
}
$data = array_column($data->toArray(),'total_sale','chef_id'); $data = array_column($data->toArray(),'total_sale','chef_id');
foreach ($this->chefInfo as $v){ foreach ($this->chefInfo as $v){
@@ -174,7 +178,11 @@ class RankTaskService
->groupBy('chef_id') ->groupBy('chef_id')
->get(); ->get();
if ($data->isEmpty()) $this->buildChefStatementNullData(LeaderboardHistoryCode::TYPE_CHEF_SCORE); if ($data->isEmpty()) {
$this->buildChefStatementNullData(LeaderboardHistoryCode::TYPE_CHEF_SCORE);
return;
}
$data = array_column($data->toArray(),'total_score','chef_id'); $data = array_column($data->toArray(),'total_score','chef_id');
foreach ($this->chefInfo as $v){ foreach ($this->chefInfo as $v){