This commit is contained in:
2023-04-19 21:18:22 +08:00
parent e2a754b767
commit 358a4d849b
4 changed files with 1 additions and 10 deletions
-4
View File
@@ -51,14 +51,12 @@ interface ' . ucfirst($name) . 'RpcInterface
namespace Rpc\Producers;
use Kiri\Annotation\Target;
use Kiri\Annotation\Mapping;
use Rpc\\' . ucfirst($name) . 'RpcInterface;
use Exception;
use Kiri\Rpc\JsonRpcConsumers;
#[Target]
#[Mapping(' . ucfirst($name) . 'RpcInterface::class)]
class ' . ucfirst($name) . 'RpcService extends JsonRpcConsumers implements ' . ucfirst($name) . 'RpcInterface
{
@@ -86,13 +84,11 @@ class ' . ucfirst($name) . 'RpcService extends JsonRpcConsumers implements ' . u
namespace Rpc\Consumers;
use Kiri\Annotation\Target;
use Kiri\Rpc\Annotation\JsonRpc;
use Kiri\Message\Handler\Controller;
use Rpc\\' . ucfirst($name) . 'RpcInterface;
#[Target]
#[JsonRpc(service: \'' . $name . '\', version: \'2.0\')]
class ' . ucfirst($name) . 'RpcConsumer extends Controller implements ' . ucfirst($name) . 'RpcInterface
{
+1 -2
View File
@@ -77,7 +77,6 @@ namespace ' . $namespace . ';
use Exception;
use Kiri\Annotation\Target;
use Kiri\Core\Json;
use Database\Connection;
use Database\Model;
@@ -98,7 +97,7 @@ use Database\Model;
*
*' . implode('', $this->visible) . '
*/
#[Target] class ' . $managerName . ' extends Model
class ' . $managerName . ' extends Model
{
';
-2
View File
@@ -39,7 +39,6 @@ namespace App\Client\Rpc;
use Kiri\Annotation\Rpc\Consumer;
use Kiri\Annotation\Rpc\RpcClient;
use Kiri\Annotation\Target;
use Exception;
use Rpc\Client;
use Kiri\Core\Json;
@@ -53,7 +52,6 @@ use Kiri;
* Class ' . $managerName . 'Consumer
* @package App\Client\Rpc
*/
#[Target]
#[RpcClient(cmd: \'' . $service . '\', port: ' . $port . ', timeout: 1, mode: ' . $mode . ')]
class ' . $managerName . 'Consumer extends \Rpc\Consumer
{
-2
View File
@@ -35,7 +35,6 @@ class GiiRpcService extends GiiBase
namespace App\Rpc;
use Kiri\Annotation\Route\RpcProducer;
use Kiri\Annotation\Target;
use Exception;
use Kiri\Message\Controller;
use Kiri\Core\Json;
@@ -48,7 +47,6 @@ use Kiri\Core\Json;
* Class ' . $managerName . 'Consumer
* @package App\Client\Rpc
*/
#[Target]
class ' . $managerName . 'Producer extends Controller
{