mirror of
https://gitee.com/technical-laohu/mpay_v2_webman.git
synced 2026-04-28 13:04:26 +08:00
更新统一使用 PHPDoc + PSR-19 标准注释
This commit is contained in:
@@ -7,11 +7,15 @@ use app\model\merchant\MerchantApiCredential;
|
||||
|
||||
/**
|
||||
* 商户 API 凭证仓库。
|
||||
*
|
||||
* 封装商户 API 凭证的单条查询与存在性统计。
|
||||
*/
|
||||
class MerchantApiCredentialRepository extends BaseRepository
|
||||
{
|
||||
/**
|
||||
* 构造函数,注入对应模型。
|
||||
* 构造方法。
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -20,6 +24,10 @@ class MerchantApiCredentialRepository extends BaseRepository
|
||||
|
||||
/**
|
||||
* 根据商户 ID 查询 API 凭证。
|
||||
*
|
||||
* @param int $merchantId 商户ID
|
||||
* @param array $columns 字段列表
|
||||
* @return MerchantApiCredential|null 凭证记录
|
||||
*/
|
||||
public function findByMerchantId(int $merchantId, array $columns = ['*']): ?MerchantApiCredential
|
||||
{
|
||||
@@ -30,6 +38,9 @@ class MerchantApiCredentialRepository extends BaseRepository
|
||||
|
||||
/**
|
||||
* 统计商户是否已开通 API 凭证。
|
||||
*
|
||||
* @param int $merchantId 商户ID
|
||||
* @return int 凭证数量
|
||||
*/
|
||||
public function countByMerchantId(int $merchantId): int
|
||||
{
|
||||
@@ -39,3 +50,6 @@ class MerchantApiCredentialRepository extends BaseRepository
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user