feat : rank

This commit is contained in:
2025-04-09 09:40:05 +08:00
parent edb295cbe2
commit 8c284937ac
6 changed files with 163 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ declare(strict_types=1);
namespace App\Service\Api\Evaluation;
use App\Cache\Redis\Api\EvaluationCache;
use App\Constants\Common\OrderCode;
use App\Exception\ErrException;
use App\Model\Evaluation;
@@ -44,6 +45,12 @@ class EvaluationService extends BaseService
#[Inject]
protected Sku $skuModel;
/**
* @var EvaluationCache
*/
#[Inject]
protected EvaluationCache $evaluationCache;
/**
* @return array
*/
@@ -89,6 +96,8 @@ class EvaluationService extends BaseService
return $insertModel;
});
$this->evaluationCache->addChefEvaluation($skuInfo->chef_id, (int)$this->request->input('score'));
return $this->return->success('success', ['id' => $insertModel->id]);
}
}