feat: sale manager

This commit is contained in:
zzw
2026-08-28 10:49:09 +08:00
parent 97eba7ad48
commit 6f567319be
82 changed files with 4491 additions and 182 deletions
+196 -78
View File
@@ -1263,6 +1263,111 @@ func (x *NumberReq) GetNumber() uint32 {
return 0
}
type NumberItem struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Number uint32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *NumberItem) Reset() {
*x = NumberItem{}
mi := &file_product_product_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NumberItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NumberItem) ProtoMessage() {}
func (x *NumberItem) ProtoReflect() protoreflect.Message {
mi := &file_product_product_proto_msgTypes[17]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NumberItem.ProtoReflect.Descriptor instead.
func (*NumberItem) Descriptor() ([]byte, []int) {
return file_product_product_proto_rawDescGZIP(), []int{17}
}
func (x *NumberItem) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *NumberItem) GetNumber() uint32 {
if x != nil {
return x.Number
}
return 0
}
// type: 1 增加, 2 减少
type NumberItemsReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
Type uint32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
Items []*NumberItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *NumberItemsReq) Reset() {
*x = NumberItemsReq{}
mi := &file_product_product_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NumberItemsReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NumberItemsReq) ProtoMessage() {}
func (x *NumberItemsReq) ProtoReflect() protoreflect.Message {
mi := &file_product_product_proto_msgTypes[18]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NumberItemsReq.ProtoReflect.Descriptor instead.
func (*NumberItemsReq) Descriptor() ([]byte, []int) {
return file_product_product_proto_rawDescGZIP(), []int{18}
}
func (x *NumberItemsReq) GetType() uint32 {
if x != nil {
return x.Type
}
return 0
}
func (x *NumberItemsReq) GetItems() []*NumberItem {
if x != nil {
return x.Items
}
return nil
}
type NumberAddReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
@@ -1273,7 +1378,7 @@ type NumberAddReq struct {
func (x *NumberAddReq) Reset() {
*x = NumberAddReq{}
mi := &file_product_product_proto_msgTypes[17]
mi := &file_product_product_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1285,7 +1390,7 @@ func (x *NumberAddReq) String() string {
func (*NumberAddReq) ProtoMessage() {}
func (x *NumberAddReq) ProtoReflect() protoreflect.Message {
mi := &file_product_product_proto_msgTypes[17]
mi := &file_product_product_proto_msgTypes[19]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1298,7 +1403,7 @@ func (x *NumberAddReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use NumberAddReq.ProtoReflect.Descriptor instead.
func (*NumberAddReq) Descriptor() ([]byte, []int) {
return file_product_product_proto_rawDescGZIP(), []int{17}
return file_product_product_proto_rawDescGZIP(), []int{19}
}
func (x *NumberAddReq) GetId() int64 {
@@ -1325,7 +1430,7 @@ type ItemsData struct {
func (x *ItemsData) Reset() {
*x = ItemsData{}
mi := &file_product_product_proto_msgTypes[18]
mi := &file_product_product_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1337,7 +1442,7 @@ func (x *ItemsData) String() string {
func (*ItemsData) ProtoMessage() {}
func (x *ItemsData) ProtoReflect() protoreflect.Message {
mi := &file_product_product_proto_msgTypes[18]
mi := &file_product_product_proto_msgTypes[20]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1350,7 +1455,7 @@ func (x *ItemsData) ProtoReflect() protoreflect.Message {
// Deprecated: Use ItemsData.ProtoReflect.Descriptor instead.
func (*ItemsData) Descriptor() ([]byte, []int) {
return file_product_product_proto_rawDescGZIP(), []int{18}
return file_product_product_proto_rawDescGZIP(), []int{20}
}
func (x *ItemsData) GetCount() int64 {
@@ -1377,7 +1482,7 @@ type VerifyItemsData struct {
func (x *VerifyItemsData) Reset() {
*x = VerifyItemsData{}
mi := &file_product_product_proto_msgTypes[19]
mi := &file_product_product_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1389,7 +1494,7 @@ func (x *VerifyItemsData) String() string {
func (*VerifyItemsData) ProtoMessage() {}
func (x *VerifyItemsData) ProtoReflect() protoreflect.Message {
mi := &file_product_product_proto_msgTypes[19]
mi := &file_product_product_proto_msgTypes[21]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1402,7 +1507,7 @@ func (x *VerifyItemsData) ProtoReflect() protoreflect.Message {
// Deprecated: Use VerifyItemsData.ProtoReflect.Descriptor instead.
func (*VerifyItemsData) Descriptor() ([]byte, []int) {
return file_product_product_proto_rawDescGZIP(), []int{19}
return file_product_product_proto_rawDescGZIP(), []int{21}
}
func (x *VerifyItemsData) GetCount() int64 {
@@ -1439,7 +1544,7 @@ type VerifyParams struct {
func (x *VerifyParams) Reset() {
*x = VerifyParams{}
mi := &file_product_product_proto_msgTypes[20]
mi := &file_product_product_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1451,7 +1556,7 @@ func (x *VerifyParams) String() string {
func (*VerifyParams) ProtoMessage() {}
func (x *VerifyParams) ProtoReflect() protoreflect.Message {
mi := &file_product_product_proto_msgTypes[20]
mi := &file_product_product_proto_msgTypes[22]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1464,7 +1569,7 @@ func (x *VerifyParams) ProtoReflect() protoreflect.Message {
// Deprecated: Use VerifyParams.ProtoReflect.Descriptor instead.
func (*VerifyParams) Descriptor() ([]byte, []int) {
return file_product_product_proto_rawDescGZIP(), []int{20}
return file_product_product_proto_rawDescGZIP(), []int{22}
}
func (x *VerifyParams) GetId() int64 {
@@ -1563,7 +1668,7 @@ type VerifyItem struct {
func (x *VerifyItem) Reset() {
*x = VerifyItem{}
mi := &file_product_product_proto_msgTypes[21]
mi := &file_product_product_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1575,7 +1680,7 @@ func (x *VerifyItem) String() string {
func (*VerifyItem) ProtoMessage() {}
func (x *VerifyItem) ProtoReflect() protoreflect.Message {
mi := &file_product_product_proto_msgTypes[21]
mi := &file_product_product_proto_msgTypes[23]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1588,7 +1693,7 @@ func (x *VerifyItem) ProtoReflect() protoreflect.Message {
// Deprecated: Use VerifyItem.ProtoReflect.Descriptor instead.
func (*VerifyItem) Descriptor() ([]byte, []int) {
return file_product_product_proto_rawDescGZIP(), []int{21}
return file_product_product_proto_rawDescGZIP(), []int{23}
}
func (x *VerifyItem) GetName() string {
@@ -1629,7 +1734,7 @@ type NameItem struct {
func (x *NameItem) Reset() {
*x = NameItem{}
mi := &file_product_product_proto_msgTypes[22]
mi := &file_product_product_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1641,7 +1746,7 @@ func (x *NameItem) String() string {
func (*NameItem) ProtoMessage() {}
func (x *NameItem) ProtoReflect() protoreflect.Message {
mi := &file_product_product_proto_msgTypes[22]
mi := &file_product_product_proto_msgTypes[24]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1654,7 +1759,7 @@ func (x *NameItem) ProtoReflect() protoreflect.Message {
// Deprecated: Use NameItem.ProtoReflect.Descriptor instead.
func (*NameItem) Descriptor() ([]byte, []int) {
return file_product_product_proto_rawDescGZIP(), []int{22}
return file_product_product_proto_rawDescGZIP(), []int{24}
}
func (x *NameItem) GetId() int64 {
@@ -1715,7 +1820,7 @@ type Item struct {
func (x *Item) Reset() {
*x = Item{}
mi := &file_product_product_proto_msgTypes[23]
mi := &file_product_product_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1727,7 +1832,7 @@ func (x *Item) String() string {
func (*Item) ProtoMessage() {}
func (x *Item) ProtoReflect() protoreflect.Message {
mi := &file_product_product_proto_msgTypes[23]
mi := &file_product_product_proto_msgTypes[25]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1740,7 +1845,7 @@ func (x *Item) ProtoReflect() protoreflect.Message {
// Deprecated: Use Item.ProtoReflect.Descriptor instead.
func (*Item) Descriptor() ([]byte, []int) {
return file_product_product_proto_rawDescGZIP(), []int{23}
return file_product_product_proto_rawDescGZIP(), []int{25}
}
func (x *Item) GetId() int64 {
@@ -2116,7 +2221,14 @@ const file_product_product_proto_rawDesc = "" +
"\tNumberReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" +
"\x04type\x18\x02 \x01(\rR\x04type\x12\x16\n" +
"\x06number\x18\x03 \x01(\rR\x06number\"6\n" +
"\x06number\x18\x03 \x01(\rR\x06number\"4\n" +
"\n" +
"NumberItem\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x16\n" +
"\x06number\x18\x02 \x01(\rR\x06number\"O\n" +
"\x0eNumberItemsReq\x12\x12\n" +
"\x04type\x18\x01 \x01(\rR\x04type\x12)\n" +
"\x05items\x18\x02 \x03(\v2\x13.product.NumberItemR\x05items\"6\n" +
"\fNumberAddReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x16\n" +
"\x06number\x18\x02 \x01(\rR\x06number\"F\n" +
@@ -2205,7 +2317,7 @@ const file_product_product_proto_rawDesc = "" +
"\x06reason\x18\" \x01(\tR\x06reason\x12\x1d\n" +
"\n" +
"admin_name\x18# \x01(\tR\tadminName\x12\x12\n" +
"\x04edit\x18$ \x01(\rR\x04edit2\xa8\v\n" +
"\x04edit\x18$ \x01(\rR\x04edit2\xe8\v\n" +
"\aProduct\x12M\n" +
"\x06Create\x12\x12.product.CreateReq\x1a\x11.product.Response\"\x1c\x82\xd3\xe4\x93\x02\x16:\x01*\"\x11/admin/v3/product\x12N\n" +
"\x04Info\x12\x10.product.InfoReq\x1a\x11.product.Response\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\x12\x16/admin/v3/product/info\x12K\n" +
@@ -2220,7 +2332,8 @@ const file_product_product_proto_rawDesc = "" +
"\bEditBase\x12\x14.product.EditBaseReq\x1a\x11.product.Response\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\x1a\x16/admin/v3/product/base\x12k\n" +
"\x0fEditSusceptible\x12\x1b.product.EditSusceptibleReq\x1a\x11.product.Response\"(\x82\xd3\xe4\x93\x02\":\x01*\x1a\x1d/admin/v3/product/susceptible\x12k\n" +
"\rEditApplyPass\x12\x19.product.EditApplyPassReq\x1a\x11.product.Response\",\x82\xd3\xe4\x93\x02&:\x01*\x1a!/admin/v3/product/edit/apply/pass\x124\n" +
"\x06Number\x12\x12.product.NumberReq\x1a\x16.google.protobuf.Empty\x12/\n" +
"\x06Number\x12\x12.product.NumberReq\x1a\x16.google.protobuf.Empty\x12>\n" +
"\vNumberItems\x12\x17.product.NumberItemsReq\x1a\x16.google.protobuf.Empty\x12/\n" +
"\bInfoById\x12\x14.product.InfoByIdReq\x1a\r.product.Item\x12=\n" +
"\n" +
"ItemsByIds\x12\x16.product.ItemsByIdsReq\x1a\x17.product.ItemsByIdsData\x12Z\n" +
@@ -2238,7 +2351,7 @@ func file_product_product_proto_rawDescGZIP() []byte {
return file_product_product_proto_rawDescData
}
var file_product_product_proto_msgTypes = make([]protoimpl.MessageInfo, 24)
var file_product_product_proto_msgTypes = make([]protoimpl.MessageInfo, 26)
var file_product_product_proto_goTypes = []any{
(*Response)(nil), // 0: product.Response
(*InfoByIdReq)(nil), // 1: product.InfoByIdReq
@@ -2257,60 +2370,65 @@ var file_product_product_proto_goTypes = []any{
(*EditBaseReq)(nil), // 14: product.EditBaseReq
(*EditSusceptibleReq)(nil), // 15: product.EditSusceptibleReq
(*NumberReq)(nil), // 16: product.NumberReq
(*NumberAddReq)(nil), // 17: product.NumberAddReq
(*ItemsData)(nil), // 18: product.ItemsData
(*VerifyItemsData)(nil), // 19: product.VerifyItemsData
(*VerifyParams)(nil), // 20: product.VerifyParams
(*VerifyItem)(nil), // 21: product.VerifyItem
(*NameItem)(nil), // 22: product.NameItem
(*Item)(nil), // 23: product.Item
(*emptypb.Empty)(nil), // 24: google.protobuf.Empty
(*NumberItem)(nil), // 17: product.NumberItem
(*NumberItemsReq)(nil), // 18: product.NumberItemsReq
(*NumberAddReq)(nil), // 19: product.NumberAddReq
(*ItemsData)(nil), // 20: product.ItemsData
(*VerifyItemsData)(nil), // 21: product.VerifyItemsData
(*VerifyParams)(nil), // 22: product.VerifyParams
(*VerifyItem)(nil), // 23: product.VerifyItem
(*NameItem)(nil), // 24: product.NameItem
(*Item)(nil), // 25: product.Item
(*emptypb.Empty)(nil), // 26: google.protobuf.Empty
}
var file_product_product_proto_depIdxs = []int32{
23, // 0: product.ItemsByIdsData.items:type_name -> product.Item
23, // 1: product.ItemsData.items:type_name -> product.Item
21, // 2: product.VerifyItemsData.items:type_name -> product.VerifyItem
20, // 3: product.VerifyItem.new:type_name -> product.VerifyParams
20, // 4: product.VerifyItem.old:type_name -> product.VerifyParams
4, // 5: product.Product.Create:input_type -> product.CreateReq
5, // 6: product.Product.Info:input_type -> product.InfoReq
6, // 7: product.Product.Items:input_type -> product.ItemsReq
7, // 8: product.Product.Names:input_type -> product.NamesReq
8, // 9: product.Product.Status:input_type -> product.StatusReq
9, // 10: product.Product.Sort:input_type -> product.SortReq
10, // 11: product.Product.Verify:input_type -> product.VerifyReq
11, // 12: product.Product.VerifyFirst:input_type -> product.VerifyStatusReq
11, // 13: product.Product.VerifySecond:input_type -> product.VerifyStatusReq
12, // 14: product.Product.EditApply:input_type -> product.EditApplyReq
14, // 15: product.Product.EditBase:input_type -> product.EditBaseReq
15, // 16: product.Product.EditSusceptible:input_type -> product.EditSusceptibleReq
13, // 17: product.Product.EditApplyPass:input_type -> product.EditApplyPassReq
16, // 18: product.Product.Number:input_type -> product.NumberReq
1, // 19: product.Product.InfoById:input_type -> product.InfoByIdReq
2, // 20: product.Product.ItemsByIds:input_type -> product.ItemsByIdsReq
17, // 21: product.Product.NumberAdd:input_type -> product.NumberAddReq
0, // 22: product.Product.Create:output_type -> product.Response
0, // 23: product.Product.Info:output_type -> product.Response
0, // 24: product.Product.Items:output_type -> product.Response
0, // 25: product.Product.Names:output_type -> product.Response
0, // 26: product.Product.Status:output_type -> product.Response
0, // 27: product.Product.Sort:output_type -> product.Response
0, // 28: product.Product.Verify:output_type -> product.Response
0, // 29: product.Product.VerifyFirst:output_type -> product.Response
0, // 30: product.Product.VerifySecond:output_type -> product.Response
0, // 31: product.Product.EditApply:output_type -> product.Response
0, // 32: product.Product.EditBase:output_type -> product.Response
0, // 33: product.Product.EditSusceptible:output_type -> product.Response
0, // 34: product.Product.EditApplyPass:output_type -> product.Response
24, // 35: product.Product.Number:output_type -> google.protobuf.Empty
23, // 36: product.Product.InfoById:output_type -> product.Item
3, // 37: product.Product.ItemsByIds:output_type -> product.ItemsByIdsData
0, // 38: product.Product.NumberAdd:output_type -> product.Response
22, // [22:39] is the sub-list for method output_type
5, // [5:22] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
25, // 0: product.ItemsByIdsData.items:type_name -> product.Item
17, // 1: product.NumberItemsReq.items:type_name -> product.NumberItem
25, // 2: product.ItemsData.items:type_name -> product.Item
23, // 3: product.VerifyItemsData.items:type_name -> product.VerifyItem
22, // 4: product.VerifyItem.new:type_name -> product.VerifyParams
22, // 5: product.VerifyItem.old:type_name -> product.VerifyParams
4, // 6: product.Product.Create:input_type -> product.CreateReq
5, // 7: product.Product.Info:input_type -> product.InfoReq
6, // 8: product.Product.Items:input_type -> product.ItemsReq
7, // 9: product.Product.Names:input_type -> product.NamesReq
8, // 10: product.Product.Status:input_type -> product.StatusReq
9, // 11: product.Product.Sort:input_type -> product.SortReq
10, // 12: product.Product.Verify:input_type -> product.VerifyReq
11, // 13: product.Product.VerifyFirst:input_type -> product.VerifyStatusReq
11, // 14: product.Product.VerifySecond:input_type -> product.VerifyStatusReq
12, // 15: product.Product.EditApply:input_type -> product.EditApplyReq
14, // 16: product.Product.EditBase:input_type -> product.EditBaseReq
15, // 17: product.Product.EditSusceptible:input_type -> product.EditSusceptibleReq
13, // 18: product.Product.EditApplyPass:input_type -> product.EditApplyPassReq
16, // 19: product.Product.Number:input_type -> product.NumberReq
18, // 20: product.Product.NumberItems:input_type -> product.NumberItemsReq
1, // 21: product.Product.InfoById:input_type -> product.InfoByIdReq
2, // 22: product.Product.ItemsByIds:input_type -> product.ItemsByIdsReq
19, // 23: product.Product.NumberAdd:input_type -> product.NumberAddReq
0, // 24: product.Product.Create:output_type -> product.Response
0, // 25: product.Product.Info:output_type -> product.Response
0, // 26: product.Product.Items:output_type -> product.Response
0, // 27: product.Product.Names:output_type -> product.Response
0, // 28: product.Product.Status:output_type -> product.Response
0, // 29: product.Product.Sort:output_type -> product.Response
0, // 30: product.Product.Verify:output_type -> product.Response
0, // 31: product.Product.VerifyFirst:output_type -> product.Response
0, // 32: product.Product.VerifySecond:output_type -> product.Response
0, // 33: product.Product.EditApply:output_type -> product.Response
0, // 34: product.Product.EditBase:output_type -> product.Response
0, // 35: product.Product.EditSusceptible:output_type -> product.Response
0, // 36: product.Product.EditApplyPass:output_type -> product.Response
26, // 37: product.Product.Number:output_type -> google.protobuf.Empty
26, // 38: product.Product.NumberItems:output_type -> google.protobuf.Empty
25, // 39: product.Product.InfoById:output_type -> product.Item
3, // 40: product.Product.ItemsByIds:output_type -> product.ItemsByIdsData
0, // 41: product.Product.NumberAdd:output_type -> product.Response
24, // [24:42] is the sub-list for method output_type
6, // [6:24] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_product_product_proto_init() }
@@ -2324,7 +2442,7 @@ func file_product_product_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_product_product_proto_rawDesc), len(file_product_product_proto_rawDesc)),
NumEnums: 0,
NumMessages: 24,
NumMessages: 26,
NumExtensions: 0,
NumServices: 1,
},