From aba2fc3b8e0c619eee26bdd5d9fb06767188af9d Mon Sep 17 00:00:00 2001 From: NoahLan <6995syu@163.com> Date: Mon, 7 Aug 2023 19:30:53 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20id=E5=85=A8=E9=83=A8=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=9B=9Eint64?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- newapi/base.tpl | 8 ++++---- rpc/template.tpl | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/newapi/base.tpl b/newapi/base.tpl index c40e2d4..283860a 100644 --- a/newapi/base.tpl +++ b/newapi/base.tpl @@ -44,7 +44,7 @@ type TimeInfo { // Basic ID Request | 基础ID结构 type IDReq { // Id | 序号 - Id uint64 `json:"id,string,optional" form:"id,string,optional"` + Id int64 `json:"id,string,optional" form:"id,string,optional"` } // Basic ID request (path) | 基础ID结构,地址参数 @@ -52,20 +52,20 @@ type IDPathReq { // ID | 序号 // // In: path - Id uint64 `json:"id,optional,string" path:"id,optional,string"` + Id int64 `json:"id,optional,string" path:"id,optional,string"` } // Basic ID List request | 基础ID列表结构,用于Post // swagger:model IDsReq type IDsReq { // 主键列表 - Ids []uint64 `json:"ids,optional" form:"ids,optional"` + Ids []int64 `json:"ids,optional" form:"ids,optional"` } // The base ID response data | 基础ID信息 type BaseIDInfo { // Id | 序号 - Id uint64 `json:"id,string,optional"` + Id int64 `json:"id,string,optional"` TimeInfo } diff --git a/rpc/template.tpl b/rpc/template.tpl index eb22132..53b8e76 100644 --- a/rpc/template.tpl +++ b/rpc/template.tpl @@ -7,11 +7,11 @@ option go_package="./{{.package}}"; message Empty {} message IDReq { - uint64 id = 1; + int64 id = 1; } message IDsReq { - repeated uint64 ids = 1; + repeated int64 ids = 1; } // 基础回执 @@ -22,7 +22,7 @@ message BaseResp { // 基础回执带ID message BaseIDResp { - uint64 id = 1; + int64 id = 1; uint32 code = 2; string msg = 3; }