repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/Services/OrderService.php | api-gateway/app/Services/OrderService.php | <?php
namespace App\Services;
use App\Exception\ServiceException;
use App\JsonRpc\OrderRpcServiceInterface;
use App\Log;
use Hyperf\Di\Annotation\Inject;
/**
* 订单service
* Class OrderService
* @package App\Services
*/
class OrderService
{
/**
* 注入OrderRpcServiceInterface
* @var OrderRpcServiceInt... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/Services/FileService.php | api-gateway/app/Services/FileService.php | <?php
namespace App\Services;
use App\Exception\ServiceException;
use App\JsonRpc\FileRpcServiceInterface;
use App\Log;
use Hyperf\Di\Annotation\Inject;
use Hyperf\Utils\Str;
/**
* 文件service
* Class UserService
* @package App\Services
*/
class FileService
{
/**
* 注入FileRpcServiceInterface
* @var ... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/Services/UserService.php | api-gateway/app/Services/UserService.php | <?php
namespace App\Services;
use App\Exception\ServiceException;
use App\JsonRpc\UserRpcServiceInterface;
use App\Log;
use Hyperf\Di\Annotation\Inject;
use Swoole\Coroutine;
/**
* 用户service
* Class UserService
* @package App\Services
*/
class UserService
{
/**
* 注入UserRpcServiceInterface
* @var ... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/JsonRpc/OrderRpcServiceInterface.php | api-gateway/app/JsonRpc/OrderRpcServiceInterface.php | <?php
/**
* @user: DoubleJin
* @date: 2022/5/24
* @create: 09:31
*/
namespace App\JsonRpc;
interface OrderRpcServiceInterface
{
public function orderList(int $userId) : array;
public function createOrder(array $data) : array;
public function orderRabbitMQ(): array;
} | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/JsonRpc/UserRpcServiceInterface.php | api-gateway/app/JsonRpc/UserRpcServiceInterface.php | <?php
/**
* @user: DoubleJin
* @date: 2022/5/24
* @create: 09:31
*/
namespace App\JsonRpc;
interface UserRpcServiceInterface
{
public function userInfo(int $userId): array;
public function userBonusList(int $page, int $pageSize): array;
public function userStoredList(int $page, int $pageSize): arra... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/JsonRpc/FileRpcServiceInterface.php | api-gateway/app/JsonRpc/FileRpcServiceInterface.php | <?php
/**
* @user: DoubleJin
* @date: 2022/12/20
* @create: 09:31
*/
namespace App\JsonRpc;
interface FileRpcServiceInterface
{
public function uploadFile(string $type, string $base64string, string $fileName): array;
} | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/Exception/ServiceException.php | api-gateway/app/Exception/ServiceException.php | <?php
declare(strict_types=1);
namespace App\Exception;
use App\Constants\ResponseCode;
use Hyperf\Server\Exception\ServerException;
use Throwable;
class ServiceException extends ServerException
{
public function __construct(int $code = 0, string $message = null, Throwable $previous = null)
{
if (is... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/Exception/BusinessException.php | api-gateway/app/Exception/BusinessException.php | <?php
declare(strict_types=1);
namespace App\Exception;
use App\Constants\ErrorCode;
use Hyperf\Server\Exception\ServerException;
use Throwable;
class BusinessException extends ServerException
{
public function __construct(int $code = 0, string $message = null, Throwable $previous = null)
{
if (is_n... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/Exception/Handler/AppServiceExceptionHandler.php | api-gateway/app/Exception/Handler/AppServiceExceptionHandler.php | <?php
declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://doc.hyperf.io
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
namespace App\Exception\Handler;
use App\Exception\ServiceException;
use Hyper... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/Exception/Handler/RateLimitExceptionHandler.php | api-gateway/app/Exception/Handler/RateLimitExceptionHandler.php | <?php
declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://doc.hyperf.io
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
namespace App\Exception\Handler;
use App\Exception\ServiceException;
use Hyper... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/Exception/Handler/AppExceptionHandler.php | api-gateway/app/Exception/Handler/AppExceptionHandler.php | <?php
declare(strict_types=1);
namespace App\Exception\Handler;
use Hyperf\Contract\StdoutLoggerInterface;
use Hyperf\ExceptionHandler\ExceptionHandler;
use Hyperf\HttpMessage\Stream\SwooleStream;
use Psr\Http\Message\ResponseInterface;
use Throwable;
class AppExceptionHandler extends ExceptionHandler
{
/**
... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/Middleware/UserAuthMiddleware.php | api-gateway/app/Middleware/UserAuthMiddleware.php | <?php
declare(strict_types=1);
namespace App\Middleware;
use App\Exception\ServiceException;
use App\Services\AuthService;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\Utils\Str;
use Psr\Container\ContainerInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/Listener/DbQueryExecutedListener.php | api-gateway/app/Listener/DbQueryExecutedListener.php | <?php
declare(strict_types=1);
namespace App\Listener;
use Hyperf\Database\Events\QueryExecuted;
use Hyperf\Event\Annotation\Listener;
use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Logger\LoggerFactory;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInte... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/Listener/QueueHandleListener.php | api-gateway/app/Listener/QueueHandleListener.php | <?php
declare(strict_types=1);
namespace App\Listener;
use Hyperf\AsyncQueue\AnnotationJob;
use Hyperf\AsyncQueue\Event\AfterHandle;
use Hyperf\AsyncQueue\Event\BeforeHandle;
use Hyperf\AsyncQueue\Event\Event;
use Hyperf\AsyncQueue\Event\FailedHandle;
use Hyperf\AsyncQueue\Event\RetryHandle;
use Hyperf\Event\Annotat... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/Constants/ResponseCode.php | api-gateway/app/Constants/ResponseCode.php | <?php
namespace App\Constants;
use Hyperf\Constants\AbstractConstants;
use Hyperf\Constants\Annotation\Constants;
/**
* @Constants
*/
class ResponseCode extends AbstractConstants
{
/**
* @Message("请求错误");
*/
const ERROR = 0;
/**
* @Message("成功");
*/
const SUCCESS = 200;
/... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/app/Constants/ErrorCode.php | api-gateway/app/Constants/ErrorCode.php | <?php
declare(strict_types=1);
namespace App\Constants;
use Hyperf\Constants\AbstractConstants;
use Hyperf\Constants\Annotation\Constants;
/**
* @Constants
*/
class ErrorCode extends AbstractConstants
{
/**
* @Message("Server Error!")
*/
const SERVER_ERROR = 500;
}
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/test/HttpTestCase.php | api-gateway/test/HttpTestCase.php | <?php
declare(strict_types=1);
namespace HyperfTest;
use Hyperf\Testing\Client;
use PHPUnit\Framework\TestCase;
/**
* Class HttpTestCase.
* @method get($uri, $data = [], $headers = [])
* @method post($uri, $data = [], $headers = [])
* @method json($uri, $data = [], $headers = [])
* @method file($uri, $data = [... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/test/bootstrap.php | api-gateway/test/bootstrap.php | <?php
declare(strict_types=1);
ini_set('display_errors', 'on');
ini_set('display_startup_errors', 'on');
error_reporting(E_ALL);
date_default_timezone_set('Asia/Shanghai');
! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_A... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/test/Cases/ExampleTest.php | api-gateway/test/Cases/ExampleTest.php | <?php
declare(strict_types=1);
namespace HyperfTest\Cases;
use HyperfTest\HttpTestCase;
/**
* @internal
* @coversNothing
*/
class ExampleTest extends HttpTestCase
{
public function testExample()
{
$this->assertTrue(true);
$this->assertTrue(is_array($this->get('/')));
}
}
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/bin/hyperf.php | api-gateway/bin/hyperf.php | #!/usr/bin/env php
<?php
ini_set('display_errors', 'on');
ini_set('display_startup_errors', 'on');
ini_set('memory_limit', '1G');
error_reporting(E_ALL);
! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
require BASE_P... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/config.php | api-gateway/config/config.php | <?php
declare(strict_types=1);
use Hyperf\Contract\StdoutLoggerInterface;
use Psr\Log\LogLevel;
return [
'app_name' => env('APP_NAME', 'skeleton'),
'app_env' => env('APP_ENV', 'dev'),
'scan_cacheable' => env('SCAN_CACHEABLE', false),
StdoutLoggerInterface::class => [
'log_level' => [
... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/routes.php | api-gateway/config/routes.php | <?php
declare(strict_types=1);
use Hyperf\HttpServer\Router\Router;
Router::addRoute(['GET', 'POST', 'HEAD'], '/', 'App\Controller\UserController@userInfo');
Router::get('/favicon.ico', function () {
return '';
});
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/container.php | api-gateway/config/container.php | <?php
/**
* Initialize a dependency injection container that implemented PSR-11 and return the container.
*/
declare(strict_types=1);
use Hyperf\Di\Container;
use Hyperf\Di\Definition\DefinitionSourceFactory;
use Hyperf\Utils\ApplicationContext;
$container = new Container((new DefinitionSourceFactory(true))());
i... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/rate_limit.php | api-gateway/config/autoload/rate_limit.php | <?php
declare(strict_types=1);
return [
'create' => 1,
'consume' => 1,
'capacity' => 1,
'limitCallback' => [],
'waitTimeout' => 1,
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/nacos.php | api-gateway/config/autoload/nacos.php | <?php
declare(strict_types=1);
return [
// nacos server url like https://nacos.hyperf.io, Priority is higher than host:port
// 'url' => '',
// The nacos host info
'host' => env('NACOS_HOST'),
'port' => env('NACOS_PORT'),
// The nacos account info
'username' => env('NACOS_USERNAME'),
'p... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/commands.php | api-gateway/config/autoload/commands.php | <?php
declare(strict_types=1);
return [
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/logger.php | api-gateway/config/autoload/logger.php | <?php
declare(strict_types=1);
return [
'default' => [
'handler' => [
'class' => Monolog\Handler\RotatingFileHandler::class,
'constructor' => [
'filename' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => Monolog\Logger::DEBUG,
],
... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/listeners.php | api-gateway/config/autoload/listeners.php | <?php
declare(strict_types=1);
return [
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/devtool.php | api-gateway/config/autoload/devtool.php | <?php
declare(strict_types=1);
return [
'generator' => [
'amqp' => [
'consumer' => [
'namespace' => 'App\\Amqp\\Consumer',
],
'producer' => [
'namespace' => 'App\\Amqp\\Producer',
],
],
'aspect' => [
... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/cache.php | api-gateway/config/autoload/cache.php | <?php
declare(strict_types=1);
return [
'default' => [
'driver' => Hyperf\Cache\Driver\RedisDriver::class,
'packer' => Hyperf\Utils\Packer\PhpSerializerPacker::class,
'prefix' => 'c:',
],
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/middlewares.php | api-gateway/config/autoload/middlewares.php | <?php
declare(strict_types=1);
return [
'http' => [
\Hyperf\Tracer\Middleware\TraceMiddleware::class,
// \App\Exception\Handler\AppServiceExceptionHandler::class,
],
'jsonrpc-http' => [
\Hyperf\Tracer\Middleware\TraceMiddleware::class,
],
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/annotations.php | api-gateway/config/autoload/annotations.php | <?php
declare(strict_types=1);
return [
'scan' => [
'paths' => [
BASE_PATH . '/app',
],
'ignore_annotations' => [
'mixin',
],
],
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/aspects.php | api-gateway/config/autoload/aspects.php | <?php
declare(strict_types=1);
return [
Hyperf\Tracer\Aspect\JsonRpcAspect::class,
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/services.php | api-gateway/config/autoload/services.php | <?php
/**
* @user: DoubleJin
* @date: 2022/5/24
* @create: 09:35
*/
// 这个是nacos服务的端口和地址
$registry = [
'protocol' => 'nacos',
'address' => 'http://'.env('NACOS_HOST').':'.env('NACOS_PORT'),
];
// 这里配置需要用的rpc服务
$services = [
[
'name' => 'OrderRpcService',
'service' => \App\JsonRpc\OrderR... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/dependencies.php | api-gateway/config/autoload/dependencies.php | <?php
declare(strict_types=1);
return [
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/redis.php | api-gateway/config/autoload/redis.php | <?php
declare(strict_types=1);
return [
'default' => [
'host' => env('REDIS_HOST', 'localhost'),
'auth' => env('REDIS_AUTH', null),
'port' => (int) env('REDIS_PORT', 6379),
'db' => (int) env('REDIS_DB', 0),
'pool' => [
'min_connections' => 1,
'max_co... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/server.php | api-gateway/config/autoload/server.php | <?php
declare(strict_types=1);
use Hyperf\Server\Event;
use Hyperf\Server\Server;
use Swoole\Constant;
return [
'mode' => SWOOLE_PROCESS,
'servers' => [
[
'name' => 'http',
'type' => Server::SERVER_HTTP,
'host' => '0.0.0.0',
'port' => 9501,
... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/databases.php | api-gateway/config/autoload/databases.php | <?php
declare(strict_types=1);
return [
'default' => [
'driver' => env('DB_DRIVER', 'mysql'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', 3306),
'database' => env('DB_DATABASE', 'hyperf'),
'username' => env('DB_USERNAME', 'root'),
'password' => e... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/opentracing.php | api-gateway/config/autoload/opentracing.php | <?php
declare(strict_types=1);
use Zipkin\Samplers\BinarySampler;
return [
'default' => env('TRACER_DRIVER', 'zipkin'),
'enable' => [
'guzzle' => env('TRACER_ENABLE_GUZZLE', false),
'redis' => env('TRACER_ENABLE_REDIS', false),
'db' => env('TRACER_ENABLE_DB', false),
'method' ... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/exceptions.php | api-gateway/config/autoload/exceptions.php | <?php
declare(strict_types=1);
return [
'handler' => [
'http' => [
Hyperf\HttpServer\Exception\Handler\HttpExceptionHandler::class,
App\Exception\Handler\AppExceptionHandler::class,
App\Exception\Handler\AppServiceExceptionHandler::class,
App\Exception\Handl... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/watcher.php | api-gateway/config/autoload/watcher.php | <?php
declare(strict_types=1);
use Hyperf\Watcher\Driver\ScanFileDriver;
return [
'driver' => ScanFileDriver::class,
'bin' => 'php',
'watch' => [
'dir' => ['app', 'config'],
'file' => ['.env'],
'scan_interval' => 2000,
],
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/processes.php | api-gateway/config/autoload/processes.php | <?php
declare(strict_types=1);
return [
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/config_center.php | api-gateway/config/autoload/config_center.php | <?php
declare(strict_types=1);
use Hyperf\ConfigCenter\Mode;
return [
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
'driver' => env('CONFIG_CENTER_DRIVER', 'nacos'),
'mode' => env('CONFIG_CENTER_MODE', Mode::PROCESS),
'drivers' => [
'nacos' => [
'driver' => Hyperf\ConfigNa... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/tracer.php | api-gateway/config/autoload/tracer.php | <?php
/**
* @user: DoubleJin
* @date: 2022/5/25
* @create: 11:29
*/
return [
// 选择默认的 Tracer
'default' => env('TRACER_DRIVER', 'jaeger'),
// 这里的代码演示不对 enable 内的配置进行展开
'enable' => [],
'tracer' => [
// Zipkin 驱动配置
'zipkin' => [
// 当前应用的配置
'app' => [
... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/api-gateway/config/autoload/async_queue.php | api-gateway/config/autoload/async_queue.php | <?php
declare(strict_types=1);
return [
'default' => [
'driver' => Hyperf\AsyncQueue\Driver\RedisDriver::class,
'redis' => [
'pool' => 'default',
],
'channel' => '{queue}',
'timeout' => 2,
'retry_seconds' => 5,
'handle_timeout' => 10,
'pr... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/Log.php | order-srv/app/Log.php | <?php
/**
* @user: DoubleJin
* @date: 2022/5/26
* @create: 14:54
*/
namespace App;
use Hyperf\Logger\LoggerFactory;
use Hyperf\Utils\ApplicationContext;
class Log
{
public static function get(string $name = 'app')
{
return ApplicationContext::getContainer()->get(LoggerFactory::class)->get($name);... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/Model/Order.php | order-srv/app/Model/Order.php | <?php
declare (strict_types=1);
namespace App\Model;
use Hyperf\DbConnection\Model\Model;
class Order extends Model
{
const CREATED_AT = 'create_time';
const UPDATED_AT = 'update_time';
protected ?string $dateFormat = 'U';
/**
* The table associated with the model.
*
*/
protected ?... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/Model/OrderGoods.php | order-srv/app/Model/OrderGoods.php | <?php
declare (strict_types=1);
namespace App\Model;
use Hyperf\DbConnection\Model\Model;
class OrderGoods extends Model
{
const CREATED_AT = 'create_time';
const UPDATED_AT = 'update_time';
protected ?string $dateFormat = 'U';
/**
* The table associated with the model.
*
*/
protec... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/Kernel/Functions.php | order-srv/app/Kernel/Functions.php | <?php
declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://doc.hyperf.io
* @contact group@hyperf.io
*/
use GuzzleHttp\Exception\GuzzleException;
use Hyperf\Redis\Redis;
use Hyperf\Logger\LoggerFactory;
use Hyperf\Utils\ApplicationContext;
use Hype... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/Controller/SagaController.php | order-srv/app/Controller/SagaController.php | <?php
declare(strict_types=1);
namespace App\Controller;
use App\Services\OrderService;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\PostMapping;
use Hyperf\Di\Annotation\Inject;
/**
* DTM.SAGA回调控制器
* Class SagaController
* @packag... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/Controller/AbstractController.php | order-srv/app/Controller/AbstractController.php | <?php
declare (strict_types=1);
namespace App\Controller;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Contract\ResponseInterface;
use Psr\Container\ContainerInterface;
abstract class AbstractController
{
#[Inject]
protected ContainerInterface ... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/Services/OrderService.php | order-srv/app/Services/OrderService.php | <?php
namespace App\Services;
use App\Amqp\Producer\OrderProducer;
use App\JsonRpc\UserRpcServiceInterface;
use App\Model\OrderGoods;
use DtmClient\Saga;
use DtmClient\TransContext;
use App\Exception\JsonRpcException;
use App\Exception\ServiceException;
use App\Log;
use App\Model\Order;
use Hyperf\Amqp\Producer;
use... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/JsonRpc/OrderRpcServiceInterface.php | order-srv/app/JsonRpc/OrderRpcServiceInterface.php | <?php
/**
* @user: DoubleJin
* @date: 2022/5/24
* @create: 09:31
*/
namespace App\JsonRpc;
interface OrderRpcServiceInterface
{
public function orderList(int $userId): array;
public function createOrder(array $data): array;
public function orderRabbitMQ(): array;
} | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/JsonRpc/UserRpcServiceInterface.php | order-srv/app/JsonRpc/UserRpcServiceInterface.php | <?php
/**
* @user: DoubleJin
* @date: 2022/5/24
* @create: 09:31
*/
namespace App\JsonRpc;
interface UserRpcServiceInterface
{
public function userInfo(int $userId): array;
public function userBonusList(int $page, int $pageSize): array;
public function userStoredList(int $page, int $pageSize): ... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/JsonRpc/OrderRpcService.php | order-srv/app/JsonRpc/OrderRpcService.php | <?php
/**
* @user: DoubleJin
* @date: 2022/5/24
* @create: 09:31
*/
namespace App\JsonRpc;
use Hyperf\RpcServer\Annotation\RpcService;
use App\Services\OrderService;
use Hyperf\Di\Annotation\Inject;
/**
* 订单rpc服务
* Class OrderRpcService
* @package App\JsonRpc
*/
#[RpcService(name:"OrderRpcService", protocol:... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/Amqp/Producer/OrderProducer.php | order-srv/app/Amqp/Producer/OrderProducer.php | <?php
declare(strict_types=1);
namespace App\Amqp\Producer;
use Hyperf\Amqp\Annotation\Producer;
use Hyperf\Amqp\Message\ProducerMessage;
/**
* 订单订阅消息生产者
* Class OrderProducer
* @package App\Amqp\Producer
*/
#[Producer(exchange: 'order', routingKey: 'order')]
class OrderProducer extends ProducerMessage
{
pu... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/Exception/ServiceException.php | order-srv/app/Exception/ServiceException.php | <?php
declare(strict_types=1);
namespace App\Exception;
use App\Constants\ErrorCode;
use Hyperf\Server\Exception\ServerException;
use Throwable;
class ServiceException extends ServerException
{
public function __construct(int $code = 0, string $message = null, Throwable $previous = null)
{
if (is_nu... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/Exception/JsonRpcException.php | order-srv/app/Exception/JsonRpcException.php | <?php
declare(strict_types=1);
namespace App\Exception;
use App\Constants\ErrorCode;
use Hyperf\Server\Exception\ServerException;
use Throwable;
class JsonRpcException extends ServerException
{
public function __construct(int $code = 0, string $message = null, Throwable $previous = null)
{
if (is_nu... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/Exception/Handler/JsonRpcExceptionHandler.php | order-srv/app/Exception/Handler/JsonRpcExceptionHandler.php | <?php
declare(strict_types=1);
namespace App\Exception\Handler;
use App\Exception\JsonRpcException;
use Hyperf\Contract\StdoutLoggerInterface;
use Hyperf\ExceptionHandler\ExceptionHandler;
use Hyperf\HttpMessage\Stream\SwooleStream;
use Hyperf\Context\Context;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Mes... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/Exception/Handler/DtmExceptionHandler.php | order-srv/app/Exception/Handler/DtmExceptionHandler.php | <?php
declare(strict_types=1);
namespace App\Exception\Handler;
use App\Exception\JsonRpcException;
use App\Exception\ServiceException;
use Hyperf\Contract\StdoutLoggerInterface;
use Hyperf\ExceptionHandler\ExceptionHandler;
use Hyperf\HttpMessage\Stream\SwooleStream;
use Hyperf\Utils\Context;
use Psr\Http\Message\R... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/Listener/DbQueryExecutedListener.php | order-srv/app/Listener/DbQueryExecutedListener.php | <?php
declare (strict_types=1);
namespace App\Listener;
use Hyperf\Database\Events\QueryExecuted;
use Hyperf\Event\Annotation\Listener;
use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Logger\LoggerFactory;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInt... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/Constants/ResponseCode.php | order-srv/app/Constants/ResponseCode.php | <?php
namespace App\Constants;
use Hyperf\Constants\AbstractConstants;
use Hyperf\Constants\Annotation\Constants;
#[Constants]
class ResponseCode extends AbstractConstants
{
/**
* @Message("请求错误");
*/
const ERROR = 0;
/**
* @Message("成功");
*/
const SUCCESS = 200;
/**
* @M... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/app/Constants/ErrorCode.php | order-srv/app/Constants/ErrorCode.php | <?php
declare (strict_types=1);
namespace App\Constants;
use Hyperf\Constants\AbstractConstants;
use Hyperf\Constants\Annotation\Constants;
#[Constants]
class ErrorCode extends AbstractConstants
{
/**
* @Message("Server Error!")
*/
const SERVER_ERROR = 500;
} | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/test/HttpTestCase.php | order-srv/test/HttpTestCase.php | <?php
declare(strict_types=1);
namespace HyperfTest;
use Hyperf\Testing\Client;
use PHPUnit\Framework\TestCase;
/**
* Class HttpTestCase.
* @method get($uri, $data = [], $headers = [])
* @method post($uri, $data = [], $headers = [])
* @method json($uri, $data = [], $headers = [])
* @method file($uri, $data = [... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/test/bootstrap.php | order-srv/test/bootstrap.php | <?php
declare(strict_types=1);
ini_set('display_errors', 'on');
ini_set('display_startup_errors', 'on');
error_reporting(E_ALL);
date_default_timezone_set('Asia/Shanghai');
! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_A... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/test/Cases/ExampleTest.php | order-srv/test/Cases/ExampleTest.php | <?php
declare(strict_types=1);
namespace HyperfTest\Cases;
use HyperfTest\HttpTestCase;
/**
* @internal
* @coversNothing
*/
class ExampleTest extends HttpTestCase
{
public function testExample()
{
$this->assertTrue(true);
$this->assertTrue(is_array($this->get('/')));
}
}
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/bin/hyperf.php | order-srv/bin/hyperf.php | #!/usr/bin/env php
<?php
ini_set('display_errors', 'on');
ini_set('display_startup_errors', 'on');
ini_set('memory_limit', '1G');
error_reporting(E_ALL);
! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
require BASE_P... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/migrations/2022_06_08_061612_create_order_table.php | order-srv/migrations/2022_06_08_061612_create_order_table.php | <?php
use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;
class CreateOrderTable extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('order', function (Blueprint $table) {
... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/migrations/2022_06_08_063020_create_order_goods_table.php | order-srv/migrations/2022_06_08_063020_create_order_goods_table.php | <?php
use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;
class CreateOrderGoodsTable extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('order_goods', function (Blueprint $table) {
... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/config.php | order-srv/config/config.php | <?php
declare(strict_types=1);
use Hyperf\Contract\StdoutLoggerInterface;
use Psr\Log\LogLevel;
return [
'app_name' => env('APP_NAME', 'skeleton'),
'app_env' => env('APP_ENV', 'dev'),
'scan_cacheable' => env('SCAN_CACHEABLE', false),
StdoutLoggerInterface::class => [
'log_level' => [
... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/routes.php | order-srv/config/routes.php | <?php
declare(strict_types=1);
use Hyperf\HttpServer\Router\Router;
Router::get('/favicon.ico', function () {
return '';
}); | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/container.php | order-srv/config/container.php | <?php
/**
* Initialize a dependency injection container that implemented PSR-11 and return the container.
*/
declare(strict_types=1);
use Hyperf\Di\Container;
use Hyperf\Di\Definition\DefinitionSourceFactory;
use Hyperf\Utils\ApplicationContext;
$container = new Container((new DefinitionSourceFactory(true))());
i... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/nacos.php | order-srv/config/autoload/nacos.php | <?php
declare(strict_types=1);
return [
// nacos server url like https://nacos.hyperf.io, Priority is higher than host:port
// 'url' => '',
// The nacos host info
'host' => env('NACOS_HOST'),
'port' => env('NACOS_PORT'),
// The nacos account info
'username' => env('NACOS_USERNAME'),
'p... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/commands.php | order-srv/config/autoload/commands.php | <?php
declare(strict_types=1);
return [
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/dtm.php | order-srv/config/autoload/dtm.php | <?php
declare(strict_types=1);
/**
* This file is part of DTM-PHP.
*
* @license https://github.com/dtm-php/dtm-client/blob/master/LICENSE
*/
use DtmClient\Constants\Protocol;
use DtmClient\Constants\DbType;
return [
'protocol' => Protocol::HTTP,
'server' => env('DTM_HOST'),
'port' => [
'http'... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/logger.php | order-srv/config/autoload/logger.php | <?php
declare(strict_types=1);
return [
'default' => [
'handler' => [
'class' => Monolog\Handler\RotatingFileHandler::class,
'constructor' => [
'filename' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => Monolog\Logger::DEBUG,
],
... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/listeners.php | order-srv/config/autoload/listeners.php | <?php
declare(strict_types=1);
return [
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/devtool.php | order-srv/config/autoload/devtool.php | <?php
declare(strict_types=1);
return [
'generator' => [
'amqp' => [
'consumer' => [
'namespace' => 'App\\Amqp\\Consumer',
],
'producer' => [
'namespace' => 'App\\Amqp\\Producer',
],
],
'aspect' => [
... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/cache.php | order-srv/config/autoload/cache.php | <?php
declare(strict_types=1);
return [
'default' => [
'driver' => Hyperf\Cache\Driver\RedisDriver::class,
'packer' => Hyperf\Utils\Packer\PhpSerializerPacker::class,
'prefix' => 'c:',
],
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/middlewares.php | order-srv/config/autoload/middlewares.php | <?php
declare(strict_types=1);
return [
'http' => [
\DtmClient\Middleware\DtmMiddleware::class,
],
'jsonrpc-http' => [
\Hyperf\Tracer\Middleware\TraceMiddleware::class,
\DtmClient\Middleware\DtmMiddleware::class,
],
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/annotations.php | order-srv/config/autoload/annotations.php | <?php
declare(strict_types=1);
return [
'scan' => [
'paths' => [
BASE_PATH . '/app',
],
'ignore_annotations' => [
'mixin',
],
],
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/aspects.php | order-srv/config/autoload/aspects.php | <?php
declare(strict_types=1);
return [
Hyperf\Tracer\Aspect\JsonRpcAspect::class,
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/services.php | order-srv/config/autoload/services.php | <?php
/**
* @user: DoubleJin
* @date: 2022/5/24
* @create: 09:35
*/
// 这个是nacos服务的端口和地址
$registry = [
'protocol' => 'nacos',
'address' => 'http://'.env('NACOS_HOST').':'.env('NACOS_PORT'),
];
// 这里配置需要用的rpc服务
$services = [
[
'name' => 'UserRpcService',
'service' => \App\JsonRpc\UserRpc... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/dependencies.php | order-srv/config/autoload/dependencies.php | <?php
declare(strict_types=1);
return [
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/amqp.php | order-srv/config/autoload/amqp.php | <?php
declare(strict_types=1);
return [
'default' => [
'host' => env('AMQP_HOST', 'localhost'),
'port' => (int) env('AMQP_PORT', 5672),
'user' => env('AMQP_USER', 'guest'),
'password' => env('AMQP_PASSWORD', 'guest'),
'vhost' => env('AMQP_VHOST', '/'),
'open_ssl' =>... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/redis.php | order-srv/config/autoload/redis.php | <?php
declare(strict_types=1);
return [
'default' => [
'host' => env('REDIS_HOST', 'localhost'),
'auth' => env('REDIS_AUTH', null),
'port' => (int) env('REDIS_PORT', 6379),
'db' => (int) env('REDIS_DB', 0),
'pool' => [
'min_connections' => 1,
'max_co... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/server.php | order-srv/config/autoload/server.php | <?php
declare(strict_types=1);
use Hyperf\Server\Event;
use Hyperf\Server\Server;
use Swoole\Constant;
return [
'mode' => SWOOLE_PROCESS,
'servers' => [
[
'name' => 'http',
'type' => Server::SERVER_HTTP,
'host' => '0.0.0.0',
'port' => 9502,
... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/databases.php | order-srv/config/autoload/databases.php | <?php
declare(strict_types=1);
return [
'default' => [
'driver' => env('DB_DRIVER', 'mysql'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', 3306),
'database' => env('DB_DATABASE', 'hyperf'),
'username' => env('DB_USERNAME', 'root'),
'password' => e... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/opentracing.php | order-srv/config/autoload/opentracing.php | <?php
declare(strict_types=1);
use Zipkin\Samplers\BinarySampler;
return [
'default' => env('TRACER_DRIVER', 'zipkin'),
'enable' => [
'guzzle' => env('TRACER_ENABLE_GUZZLE', false),
'redis' => env('TRACER_ENABLE_REDIS', false),
'db' => env('TRACER_ENABLE_DB', false),
'method' ... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/exceptions.php | order-srv/config/autoload/exceptions.php | <?php
declare(strict_types=1);
return [
'handler' => [
'http' => [
Hyperf\HttpServer\Exception\Handler\HttpExceptionHandler::class,
App\Exception\Handler\DtmExceptionHandler::class,
],
'jsonrpc-http' => [
App\Exception\Handler\JsonRpcExceptionHandler::cl... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/watcher.php | order-srv/config/autoload/watcher.php | <?php
declare(strict_types=1);
use Hyperf\Watcher\Driver\ScanFileDriver;
return [
'driver' => ScanFileDriver::class,
'bin' => 'php',
'watch' => [
'dir' => ['app', 'config'],
'file' => ['.env'],
'scan_interval' => 2000,
],
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/processes.php | order-srv/config/autoload/processes.php | <?php
declare(strict_types=1);
return [
];
| php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/config_center.php | order-srv/config/autoload/config_center.php | <?php
declare(strict_types=1);
use Hyperf\ConfigCenter\Mode;
return [
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
'driver' => env('CONFIG_CENTER_DRIVER', 'nacos'),
'mode' => env('CONFIG_CENTER_MODE', Mode::PROCESS),
'drivers' => [
'nacos' => [
'driver' => Hyperf\ConfigNa... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/config/autoload/tracer.php | order-srv/config/autoload/tracer.php | <?php
/**
* @user: DoubleJin
* @date: 2022/5/25
* @create: 11:29
*/
return [
// 选择默认的 Tracer
'default' => env('TRACER_DRIVER', 'jaeger'),
// 这里的代码演示不对 enable 内的配置进行展开
'enable' => [],
'tracer' => [
// Zipkin 驱动配置
'zipkin' => [
// 当前应用的配置
'app' => [
... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/seeders/order_seeder.php | order-srv/seeders/order_seeder.php | <?php
declare(strict_types=1);
use Hyperf\Database\Seeders\Seeder;
class OrderSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
\Hyperf\DbConnection\Db::table('order')->insert([
'order_no' => '20220527',
'... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
Double-Jin/jin-microservices | https://github.com/Double-Jin/jin-microservices/blob/15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a/order-srv/seeders/order_goods_seeder.php | order-srv/seeders/order_goods_seeder.php | <?php
declare(strict_types=1);
use Hyperf\Database\Seeders\Seeder;
class OrderGoodsSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
\Hyperf\DbConnection\Db::table('order_goods')->insert([
'order_no' => '20220527',
... | php | MIT | 15c02c8d0bb68ee4f326c249dc3dfeb144b6c81a | 2026-01-05T02:43:47.435515Z | false |
thephpleague/omnipay-stripe | https://github.com/thephpleague/omnipay-stripe/blob/033ea3e6f3d1ea75c50a78b8d88fcab84afa27b7/src/Gateway.php | src/Gateway.php | <?php
/**
* Stripe Charge Gateway.
*/
namespace Omnipay\Stripe;
/**
* Stripe Charge Gateway.
*
* @see \Omnipay\Stripe\AbstractGateway
* @see \Omnipay\Stripe\Message\AbstractRequest
*
* @link https://stripe.com/docs/api
*
*/
class Gateway extends AbstractGateway
{
/**
* @inheritdoc
*/
publi... | php | MIT | 033ea3e6f3d1ea75c50a78b8d88fcab84afa27b7 | 2026-01-05T02:43:52.784905Z | false |
thephpleague/omnipay-stripe | https://github.com/thephpleague/omnipay-stripe/blob/033ea3e6f3d1ea75c50a78b8d88fcab84afa27b7/src/StripeItem.php | src/StripeItem.php | <?php
/**
* Stripe Item
*/
namespace Omnipay\Stripe;
use Omnipay\Common\Item;
/**
* Class StripeItem
*
* @package Omnipay\Stripe
*/
class StripeItem extends Item
{
public function getTaxes()
{
return $this->getParameter('taxes');
}
public function setTaxes($value)
{
$this->... | php | MIT | 033ea3e6f3d1ea75c50a78b8d88fcab84afa27b7 | 2026-01-05T02:43:52.784905Z | false |
thephpleague/omnipay-stripe | https://github.com/thephpleague/omnipay-stripe/blob/033ea3e6f3d1ea75c50a78b8d88fcab84afa27b7/src/CheckoutGateway.php | src/CheckoutGateway.php | <?php
/**
* Stripe Payment Intents Gateway.
*/
namespace Omnipay\Stripe;
/**
* Stripe Payment Intents Gateway.
*
* @see \Omnipay\Stripe\AbstractGateway
* @see \Omnipay\Stripe\Message\AbstractRequest
* @link https://stripe.com/docs/api
* @method \Omnipay\Common\Message\NotificationInterface acceptNotificati... | php | MIT | 033ea3e6f3d1ea75c50a78b8d88fcab84afa27b7 | 2026-01-05T02:43:52.784905Z | false |
thephpleague/omnipay-stripe | https://github.com/thephpleague/omnipay-stripe/blob/033ea3e6f3d1ea75c50a78b8d88fcab84afa27b7/src/StripeItemBag.php | src/StripeItemBag.php | <?php
/**
* Stripe Item bag
*/
namespace Omnipay\Stripe;
use Omnipay\Common\ItemBag;
use Omnipay\Common\ItemInterface;
/**
* Class StripeItemBag
*
* @package Omnipay\Stripe
*/
class StripeItemBag extends ItemBag
{
/**
* Add an item to the bag
*
* @see Item
*
* @param ItemInterface|... | php | MIT | 033ea3e6f3d1ea75c50a78b8d88fcab84afa27b7 | 2026-01-05T02:43:52.784905Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.