fix: 统一分页请求的 offset 语义

This commit is contained in:
zetaloop
2026-04-07 17:56:38 +08:00
parent 424b2b1cca
commit d153b5cf51
46 changed files with 334 additions and 346 deletions
+19 -19
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v3.19.4
// protoc v7.34.1
// source: shop.proto
package pb
@@ -540,7 +540,7 @@ func (x *GetShopInvitationsByIdResp) GetShopInvitations() *ShopInvitations {
type SearchShopInvitationsReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page
Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id
ShopId int64 `protobuf:"varint,4,opt,name=shopId,proto3" json:"shopId,omitempty"` //shopId
@@ -583,9 +583,9 @@ func (*SearchShopInvitationsReq) Descriptor() ([]byte, []int) {
return file_shop_proto_rawDescGZIP(), []int{9}
}
func (x *SearchShopInvitationsReq) GetPage() int64 {
func (x *SearchShopInvitationsReq) GetOffset() int64 {
if x != nil {
return x.Page
return x.Offset
}
return 0
}
@@ -1177,7 +1177,7 @@ func (x *GetShopPlayersByIdResp) GetShopPlayers() *ShopPlayers {
type SearchShopPlayersReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page
Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
ShopId int64 `protobuf:"varint,3,opt,name=shopId,proto3" json:"shopId,omitempty"` //shopId
PlayerId int64 `protobuf:"varint,4,opt,name=playerId,proto3" json:"playerId,omitempty"` //playerId
@@ -1218,9 +1218,9 @@ func (*SearchShopPlayersReq) Descriptor() ([]byte, []int) {
return file_shop_proto_rawDescGZIP(), []int{20}
}
func (x *SearchShopPlayersReq) GetPage() int64 {
func (x *SearchShopPlayersReq) GetOffset() int64 {
if x != nil {
return x.Page
return x.Offset
}
return 0
}
@@ -2062,7 +2062,7 @@ func (x *GetShopsByIdResp) GetShops() *Shops {
type SearchShopsReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page
Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` //offset
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id
OwnerId int64 `protobuf:"varint,4,opt,name=ownerId,proto3" json:"ownerId,omitempty"` //ownerId
@@ -2115,9 +2115,9 @@ func (*SearchShopsReq) Descriptor() ([]byte, []int) {
return file_shop_proto_rawDescGZIP(), []int{31}
}
func (x *SearchShopsReq) GetPage() int64 {
func (x *SearchShopsReq) GetOffset() int64 {
if x != nil {
return x.Page
return x.Offset
}
return 0
}
@@ -2330,9 +2330,9 @@ const file_shop_proto_rawDesc = "" +
"\x19GetShopInvitationsByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"[\n" +
"\x1aGetShopInvitationsByIdResp\x12=\n" +
"\x0fshopInvitations\x18\x01 \x01(\v2\x13.pb.ShopInvitationsR\x0fshopInvitations\"\xfe\x01\n" +
"\x18SearchShopInvitationsReq\x12\x12\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" +
"\x0fshopInvitations\x18\x01 \x01(\v2\x13.pb.ShopInvitationsR\x0fshopInvitations\"\x82\x02\n" +
"\x18SearchShopInvitationsReq\x12\x16\n" +
"\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" +
"\x02id\x18\x03 \x01(\x03R\x02id\x12\x16\n" +
"\x06shopId\x18\x04 \x01(\x03R\x06shopId\x12\x1a\n" +
@@ -2371,9 +2371,9 @@ const file_shop_proto_rawDesc = "" +
"\x06shopId\x18\x01 \x01(\x03R\x06shopId\x12\x1a\n" +
"\bplayerId\x18\x02 \x01(\x03R\bplayerId\"K\n" +
"\x16GetShopPlayersByIdResp\x121\n" +
"\vshopPlayers\x18\x01 \x01(\v2\x0f.pb.ShopPlayersR\vshopPlayers\"\xc6\x01\n" +
"\x14SearchShopPlayersReq\x12\x12\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" +
"\vshopPlayers\x18\x01 \x01(\v2\x0f.pb.ShopPlayersR\vshopPlayers\"\xca\x01\n" +
"\x14SearchShopPlayersReq\x12\x16\n" +
"\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x16\n" +
"\x06shopId\x18\x03 \x01(\x03R\x06shopId\x12\x1a\n" +
"\bplayerId\x18\x04 \x01(\x03R\bplayerId\x12\x1c\n" +
@@ -2446,9 +2446,9 @@ const file_shop_proto_rawDesc = "" +
"\x0fGetShopsByIdReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"3\n" +
"\x10GetShopsByIdResp\x12\x1f\n" +
"\x05shops\x18\x01 \x01(\v2\t.pb.ShopsR\x05shops\"\xee\x04\n" +
"\x0eSearchShopsReq\x12\x12\n" +
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" +
"\x05shops\x18\x01 \x01(\v2\t.pb.ShopsR\x05shops\"\xf2\x04\n" +
"\x0eSearchShopsReq\x12\x16\n" +
"\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x14\n" +
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" +
"\x02id\x18\x03 \x01(\x03R\x02id\x12\x18\n" +
"\aownerId\x18\x04 \x01(\x03R\aownerId\x12\x12\n" +