diff --git a/src/Infrastructure/Repository/PointLogRepo.php b/src/Infrastructure/Repository/PointLogRepo.php index 60a28e5..cf86d56 100644 --- a/src/Infrastructure/Repository/PointLogRepo.php +++ b/src/Infrastructure/Repository/PointLogRepo.php @@ -14,13 +14,14 @@ namespace Singularity\HDK\Pay\Infrastructure\Repository; use Carbon\Carbon; use Hyperf\Codec\Json; use Singularity\HDK\Pay\Domain\Account\Aggregate\PointLog\PointLog; +use Singularity\HDK\Pay\Domain\Account\Enum\PointType; use Singularity\HDK\Pay\Domain\Account\Repository\PointLogRepoInterface; final class PointLogRepo extends AbstractRepo implements PointLogRepoInterface { - public function getList(string $uid, ?string $type = null): array + public function getList(string $uid, ?PointType $type = null): array { - $type ??= 'all'; + $type = isset($type) ? $type->value: 'all'; $response = $this->requestService->requestGet(url: "/rpc/v2/account/$uid/balance/$type/logs"); $content = $response->getBody()->getContents();