Переглянути джерело

feat(matchexchange): 添加获取开放交易物品列表功能

- 在 proto_route.php 中添加 'open' 接口
- 更新 Game.proto 文件,添加 RequestMatchexchangeOpen 和 ResponseMatchexchangeOpen 消息类型
- 生成对应的 PHP 类文件
notfff 7 місяців тому
батько
коміт
c14009a2fa

+ 2 - 1
config/proto_route.php

@@ -49,6 +49,7 @@ return array (
       1 => 'cancel',
       2 => 'list',
       3 => 'my',
+      4 => 'open',
     ),
     'pet' => 
     array (
@@ -99,7 +100,7 @@ return array (
       7 => 'query_data',
     ),
   ),
-  'generated_at' => '+08:00 2025-06-12 11:50:50',
+  'generated_at' => '+08:00 2025-06-13 16:51:21',
   'conventions' => 
   array (
     'handler_namespace' => 'App\\Module\\AppGame\\Handler',

+ 12 - 6
protophp/GPBMetadata/Proto/Game.php

@@ -16,8 +16,8 @@ class Game
         }
         $pool->internalAddGeneratedFile(
             '
-†¶
-proto/game.proto	uraus.kku"ß;
+õ·
+proto/game.proto	uraus.kku"Ô<
 Request
 request_unid (	;
 public_tokend (2%.uraus.kku.Request.RequestPublicToken;
@@ -85,7 +85,8 @@ shop_query
 matchexchange_listÌ (2+.uraus.kku.Request.RequestMatchexchangeListF
 matchexchange_addÍ (2*.uraus.kku.Request.RequestMatchexchangeAddL
 matchexchange_cancelÎ (2-.uraus.kku.Request.RequestMatchexchangeCancelD
-matchexchange_myÏ (2).uraus.kku.Request.RequestMatchexchangeMy#
+matchexchange_myÏ (2).uraus.kku.Request.RequestMatchexchangeMyH
+matchexchange_openÐ (2+.uraus.kku.Request.RequestMatchexchangeOpen#
 RequestPublicToken
 times (6
 RequestPublicLogin
@@ -263,7 +264,9 @@ select_ids (.
 RequestMatchexchangeMy
 item_id (2
 	direction (2.uraus.kku.Common.MEX_DIRECTION+
-page (2.uraus.kku.Common.RequestPage"ãI
+page (2.uraus.kku.Common.RequestPage)
+RequestMatchexchangeOpen
+times ("ÝJ
 Response
 run_unid (	
 run_ms (-
@@ -340,7 +343,8 @@ shop_query
 matchexchange_listÌ (2-.uraus.kku.Response.ResponseMatchexchangeListH
 matchexchange_addÍ (2,.uraus.kku.Response.ResponseMatchexchangeAddN
 matchexchange_cancelÎ (2/.uraus.kku.Response.ResponseMatchexchangeCancelF
-matchexchange_myÏ (2+.uraus.kku.Response.ResponseMatchexchangeMy$
+matchexchange_myÏ (2+.uraus.kku.Response.ResponseMatchexchangeMyJ
+matchexchange_openÐ (2-.uraus.kku.Response.ResponseMatchexchangeOpen$
 ResponsePublicToken
 token (	u
 ResponsePublicLogin
@@ -514,7 +518,9 @@ last_times (
 ResponseTaskAccept
 ResponseTaskAbandon
 ResponseTaskClaimReward
-ResponseTaskComplete½
+ResponseTaskComplete,
+ResponseMatchexchangeOpen
+item_id (½
 ResponseMatchexchangeList,
 page (2.uraus.kku.Common.ResponsePage3
 list (2%.uraus.kku.Response.MatchexchangeItem=

+ 44 - 0
protophp/Uraus/Kku/Request.php

@@ -403,6 +403,12 @@ class Request extends \Google\Protobuf\Internal\Message
      * Generated from protobuf field <code>.uraus.kku.Request.RequestMatchexchangeMy matchexchange_my = 1103;</code>
      */
     protected $matchexchange_my = null;
+    /**
+     * 获取开放的物品列表
+     *
+     * Generated from protobuf field <code>.uraus.kku.Request.RequestMatchexchangeOpen matchexchange_open = 1104;</code>
+     */
+    protected $matchexchange_open = null;
 
     /**
      * Constructor.
@@ -544,6 +550,8 @@ class Request extends \Google\Protobuf\Internal\Message
      *           取消挂单
      *     @type \Uraus\Kku\Request\RequestMatchexchangeMy $matchexchange_my
      *           我的挂单
+     *     @type \Uraus\Kku\Request\RequestMatchexchangeOpen $matchexchange_open
+     *           获取开放的物品列表
      * }
      */
     public function __construct($data = NULL) {
@@ -2825,5 +2833,41 @@ class Request extends \Google\Protobuf\Internal\Message
         return $this;
     }
 
+    /**
+     * 获取开放的物品列表
+     *
+     * Generated from protobuf field <code>.uraus.kku.Request.RequestMatchexchangeOpen matchexchange_open = 1104;</code>
+     * @return \Uraus\Kku\Request\RequestMatchexchangeOpen
+     */
+    public function getMatchexchangeOpen()
+    {
+        return isset($this->matchexchange_open) ? $this->matchexchange_open : null;
+    }
+
+    public function hasMatchexchangeOpen()
+    {
+        return isset($this->matchexchange_open);
+    }
+
+    public function clearMatchexchangeOpen()
+    {
+        unset($this->matchexchange_open);
+    }
+
+    /**
+     * 获取开放的物品列表
+     *
+     * Generated from protobuf field <code>.uraus.kku.Request.RequestMatchexchangeOpen matchexchange_open = 1104;</code>
+     * @param \Uraus\Kku\Request\RequestMatchexchangeOpen $var
+     * @return $this
+     */
+    public function setMatchexchangeOpen($var)
+    {
+        GPBUtil::checkMessage($var, \Uraus\Kku\Request\RequestMatchexchangeOpen::class);
+        $this->matchexchange_open = $var;
+
+        return $this;
+    }
+
 }
 

+ 68 - 0
protophp/Uraus/Kku/Request/RequestMatchexchangeOpen.php

@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: proto/game.proto
+
+namespace Uraus\Kku\Request;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>uraus.kku.Request.RequestMatchexchangeOpen</code>
+ */
+class RequestMatchexchangeOpen extends \Google\Protobuf\Internal\Message
+{
+    /**
+     * 时间戳
+     *
+     * Generated from protobuf field <code>int64 times = 1;</code>
+     */
+    protected $times = 0;
+
+    /**
+     * Constructor.
+     *
+     * @param array $data {
+     *     Optional. Data for populating the Message object.
+     *
+     *     @type int|string $times
+     *           时间戳
+     * }
+     */
+    public function __construct($data = NULL) {
+        \GPBMetadata\Proto\Game::initOnce();
+        parent::__construct($data);
+    }
+
+    /**
+     * 时间戳
+     *
+     * Generated from protobuf field <code>int64 times = 1;</code>
+     * @return int|string
+     */
+    public function getTimes()
+    {
+        return $this->times;
+    }
+
+    /**
+     * 时间戳
+     *
+     * Generated from protobuf field <code>int64 times = 1;</code>
+     * @param int|string $var
+     * @return $this
+     */
+    public function setTimes($var)
+    {
+        GPBUtil::checkInt64($var);
+        $this->times = $var;
+
+        return $this;
+    }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(RequestMatchexchangeOpen::class, \Uraus\Kku\Request_RequestMatchexchangeOpen::class);
+

+ 16 - 0
protophp/Uraus/Kku/Request_RequestMatchexchangeOpen.php

@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: proto/game.proto
+
+namespace Uraus\Kku;
+
+if (false) {
+    /**
+     * This class is deprecated. Use Uraus\Kku\Request\RequestMatchexchangeOpen instead.
+     * @deprecated
+     */
+    class Request_RequestMatchexchangeOpen {}
+}
+class_exists(Request\RequestMatchexchangeOpen::class);
+@trigger_error('Uraus\Kku\Request_RequestMatchexchangeOpen is deprecated and will be removed in the next major release. Use Uraus\Kku\Request\RequestMatchexchangeOpen instead', E_USER_DEPRECATED);
+

+ 44 - 0
protophp/Uraus/Kku/Response.php

@@ -481,6 +481,12 @@ class Response extends \Google\Protobuf\Internal\Message
      * Generated from protobuf field <code>.uraus.kku.Response.ResponseMatchexchangeMy matchexchange_my = 1103;</code>
      */
     protected $matchexchange_my = null;
+    /**
+     * 开放交易的物品列表
+     *
+     * Generated from protobuf field <code>.uraus.kku.Response.ResponseMatchexchangeOpen matchexchange_open = 1104;</code>
+     */
+    protected $matchexchange_open = null;
 
     /**
      * Constructor.
@@ -667,6 +673,8 @@ class Response extends \Google\Protobuf\Internal\Message
      *           取消 挂单
      *     @type \Uraus\Kku\Response\ResponseMatchexchangeMy $matchexchange_my
      *           我的挂单
+     *     @type \Uraus\Kku\Response\ResponseMatchexchangeOpen $matchexchange_open
+     *           开放交易的物品列表
      * }
      */
     public function __construct($data = NULL) {
@@ -3264,5 +3272,41 @@ class Response extends \Google\Protobuf\Internal\Message
         return $this;
     }
 
+    /**
+     * 开放交易的物品列表
+     *
+     * Generated from protobuf field <code>.uraus.kku.Response.ResponseMatchexchangeOpen matchexchange_open = 1104;</code>
+     * @return \Uraus\Kku\Response\ResponseMatchexchangeOpen
+     */
+    public function getMatchexchangeOpen()
+    {
+        return isset($this->matchexchange_open) ? $this->matchexchange_open : null;
+    }
+
+    public function hasMatchexchangeOpen()
+    {
+        return isset($this->matchexchange_open);
+    }
+
+    public function clearMatchexchangeOpen()
+    {
+        unset($this->matchexchange_open);
+    }
+
+    /**
+     * 开放交易的物品列表
+     *
+     * Generated from protobuf field <code>.uraus.kku.Response.ResponseMatchexchangeOpen matchexchange_open = 1104;</code>
+     * @param \Uraus\Kku\Response\ResponseMatchexchangeOpen $var
+     * @return $this
+     */
+    public function setMatchexchangeOpen($var)
+    {
+        GPBUtil::checkMessage($var, \Uraus\Kku\Response\ResponseMatchexchangeOpen::class);
+        $this->matchexchange_open = $var;
+
+        return $this;
+    }
+
 }
 

+ 70 - 0
protophp/Uraus/Kku/Response/ResponseMatchexchangeOpen.php

@@ -0,0 +1,70 @@
+<?php
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: proto/game.proto
+
+namespace Uraus\Kku\Response;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * 开放交易的物品列表
+ *
+ * Generated from protobuf message <code>uraus.kku.Response.ResponseMatchexchangeOpen</code>
+ */
+class ResponseMatchexchangeOpen extends \Google\Protobuf\Internal\Message
+{
+    /**
+     * 物品ID
+     *
+     * Generated from protobuf field <code>repeated int64 item_id = 1;</code>
+     */
+    private $item_id;
+
+    /**
+     * Constructor.
+     *
+     * @param array $data {
+     *     Optional. Data for populating the Message object.
+     *
+     *     @type int[]|string[]|\Google\Protobuf\Internal\RepeatedField $item_id
+     *           物品ID
+     * }
+     */
+    public function __construct($data = NULL) {
+        \GPBMetadata\Proto\Game::initOnce();
+        parent::__construct($data);
+    }
+
+    /**
+     * 物品ID
+     *
+     * Generated from protobuf field <code>repeated int64 item_id = 1;</code>
+     * @return \Google\Protobuf\Internal\RepeatedField
+     */
+    public function getItemId()
+    {
+        return $this->item_id;
+    }
+
+    /**
+     * 物品ID
+     *
+     * Generated from protobuf field <code>repeated int64 item_id = 1;</code>
+     * @param int[]|string[]|\Google\Protobuf\Internal\RepeatedField $var
+     * @return $this
+     */
+    public function setItemId($var)
+    {
+        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64);
+        $this->item_id = $arr;
+
+        return $this;
+    }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(ResponseMatchexchangeOpen::class, \Uraus\Kku\Response_ResponseMatchexchangeOpen::class);
+

+ 16 - 0
protophp/Uraus/Kku/Response_ResponseMatchexchangeOpen.php

@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: proto/game.proto
+
+namespace Uraus\Kku;
+
+if (false) {
+    /**
+     * This class is deprecated. Use Uraus\Kku\Response\ResponseMatchexchangeOpen instead.
+     * @deprecated
+     */
+    class Response_ResponseMatchexchangeOpen {}
+}
+class_exists(Response\ResponseMatchexchangeOpen::class);
+@trigger_error('Uraus\Kku\Response_ResponseMatchexchangeOpen is deprecated and will be removed in the next major release. Use Uraus\Kku\Response\ResponseMatchexchangeOpen instead', E_USER_DEPRECATED);
+