This commit is contained in:
2021-11-30 15:10:01 +08:00
parent e5b57cbcdb
commit b826e1f594
36 changed files with 155 additions and 81 deletions
+3 -3
View File
@@ -68,9 +68,9 @@ namespace {$namespace};
} else {
$import = "use Kiri;
use Exception;
use Annotation\Target;
use Annotation\Route\Middleware;
use Annotation\Route\Route;
use Note\Target;
use Note\Route\Middleware;
use Note\Route\Route;
use Kiri\Core\Str;
use Kiri\Core\Json;
use Http\Context\Request;
+4 -4
View File
@@ -51,8 +51,8 @@ interface ' . ucfirst($name) . 'RpcInterface
namespace Rpc\Producers;
use Annotation\Target;
use Annotation\Mapping;
use Note\Target;
use Note\Mapping;
use Rpc\\' . ucfirst($name) . 'RpcInterface;
use Exception;
use Kiri\Rpc\JsonRpcConsumers;
@@ -86,8 +86,8 @@ class ' . ucfirst($name) . 'RpcService extends JsonRpcConsumers implements ' . u
namespace Rpc\Consumers;
use Annotation\Target;
use Kiri\Rpc\Annotation\JsonRpc;
use Note\Target;
use Kiri\Rpc\Note\JsonRpc;
use Http\Handler\Controller;
use Rpc\\' . ucfirst($name) . 'RpcInterface;
+7 -7
View File
@@ -69,11 +69,11 @@ namespace ' . $namespace . ';
$html .= $imports . PHP_EOL;
}
if (!str_contains($imports, 'Database\Annotation\Set')) {
$html .= 'use Database\Annotation\Set;' . PHP_EOL;
if (!str_contains($imports, 'Database\Note\Set')) {
$html .= 'use Database\Note\Set;' . PHP_EOL;
}
if (!str_contains($imports, 'Database\Annotation\Get')) {
$html .= 'use Database\Annotation\Get;' . PHP_EOL;
if (!str_contains($imports, 'Database\Note\Get')) {
$html .= 'use Database\Note\Get;' . PHP_EOL;
}
} catch (\Throwable $e) {
logger()->addError($e, 'throwable');
@@ -87,11 +87,11 @@ namespace ' . $namespace . ';
use Exception;
use Annotation\Target;
use Note\Target;
use Kiri\Core\Json;
use Database\Connection;
use Database\Annotation\Get;
use Database\Annotation\Set;
use Database\Note\Get;
use Database\Note\Set;
use Database\Relation;
use Database\Model;
' . PHP_EOL;
+3 -3
View File
@@ -36,9 +36,9 @@ class GiiRpcClient extends GiiBase
namespace App\Client\Rpc;
use Annotation\Rpc\Consumer;
use Annotation\Rpc\RpcClient;
use Annotation\Target;
use Note\Rpc\Consumer;
use Note\Rpc\RpcClient;
use Note\Target;
use Exception;
use Rpc\Client;
use Kiri\Core\Json;
+2 -2
View File
@@ -33,8 +33,8 @@ class GiiRpcService extends GiiBase
namespace App\Rpc;
use Annotation\Route\RpcProducer;
use Annotation\Target;
use Note\Route\RpcProducer;
use Note\Target;
use Exception;
use Http\Controller;
use Kiri\Core\Json;