feat : rank
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user