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