mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 02:15:07 +08:00
- 创建 Email 值对象用于封装邮箱信息 - 扩展 AccountRepoInterface 添加邮箱管理方法 - 重命名 AccountBalanceRepo 为 AccountRepo 并实现邮箱功能 - 更新相关测试用例和配置以适配新功能
82 lines
3.2 KiB
PHP
82 lines
3.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Singularity\HDK\Pay;
|
|
|
|
use Hyperf\Contract\StdoutLoggerInterface;
|
|
use Hyperf\Framework\Logger\StdoutLogger;
|
|
use Singularity\HDK\Pay\Domain\Account\Repository\AccountRepoInterface;
|
|
use Singularity\HDK\Pay\Domain\Account\Repository\PointLogRepoInterface;
|
|
use Singularity\HDK\Pay\Domain\Invoice\Repository\FrequentAddressRepoInterface;
|
|
use Singularity\HDK\Pay\Domain\Invoice\Repository\InvoiceProductRepoInterface;
|
|
use Singularity\HDK\Pay\Domain\Invoice\Repository\InvoiceRepoInterface;
|
|
use Singularity\HDK\Pay\Domain\Product\Repository\ExchangeRepoInterface;
|
|
use Singularity\HDK\Pay\Domain\Product\Repository\RechargeProductRepoInterface;
|
|
use Singularity\HDK\Pay\Domain\Transaction\Repository\OrderRepoInterface;
|
|
use Singularity\HDK\Pay\Infrastructure\Repository\AccountRepo;
|
|
use Singularity\HDK\Pay\Infrastructure\Repository\FrequentAddressRepo;
|
|
use Singularity\HDK\Pay\Infrastructure\Repository\InvoiceProductRepo;
|
|
use Singularity\HDK\Pay\Infrastructure\Repository\InvoiceRepo;
|
|
use Singularity\HDK\Pay\Infrastructure\Repository\OrderRepo;
|
|
use Singularity\HDK\Pay\Infrastructure\Repository\PointLogRepo;
|
|
use Singularity\HDK\Pay\Infrastructure\Repository\ProductRepo;
|
|
|
|
/**
|
|
* ConfigProvider.php@HyperfAuth
|
|
*
|
|
* @author 李东云 <Dongyun.Li@LuxCreo.Ai>
|
|
* Powered by PhpStorm
|
|
* Created on 2023/1/16
|
|
*/
|
|
class ConfigProvider
|
|
{
|
|
public function __invoke(): array
|
|
{
|
|
return [
|
|
// 合并到 config/autoload/dependencies.php 文件
|
|
'dependencies' => [
|
|
StdoutLoggerInterface::class => StdoutLogger::class,
|
|
|
|
// Repo
|
|
// account
|
|
AccountRepoInterface::class => AccountRepo::class,
|
|
PointLogRepoInterface::class => PointLogRepo::class,
|
|
|
|
// product
|
|
ExchangeRepoInterface::class => ProductRepo::class,
|
|
RechargeProductRepoInterface::class => ProductRepo::class,
|
|
|
|
// transaction
|
|
OrderRepoInterface::class => OrderRepo::class,
|
|
|
|
// invoice
|
|
InvoiceProductRepoInterface::class => InvoiceProductRepo::class,
|
|
InvoiceRepoInterface::class => InvoiceRepo::class,
|
|
FrequentAddressRepoInterface::class => FrequentAddressRepo::class,
|
|
],
|
|
// 合并到 config/autoload/annotations.php 文件
|
|
'annotations' => [
|
|
'scan' => [
|
|
'paths' => [
|
|
__DIR__,
|
|
],
|
|
],
|
|
],
|
|
// 默认 Command 的定义,合并到 Hyperf\Contract\ConfigInterface 内,换个方式理解也就是与 config/autoload/commands.php 对应
|
|
'commands' => [],
|
|
// 与 commands 类似
|
|
'listeners' => [],
|
|
// 组件默认配置文件,即执行命令后会把 source 的对应的文件复制为 destination 对应的的文件
|
|
'publish' => [
|
|
[
|
|
'id' => 'config',
|
|
'description' => 'The config file for LuxPay',
|
|
'source' => __DIR__ . '/../publish/payment.php',
|
|
'destination' => BASE_PATH . '/config/autoload/payment.php',
|
|
],
|
|
],
|
|
];
|
|
}
|
|
}
|