feat: sale info

This commit is contained in:
zzw
2026-08-28 15:05:44 +08:00
parent 8bdd25dcb5
commit eb887198e9
14 changed files with 762 additions and 92 deletions
+464 -40
View File
@@ -838,6 +838,378 @@ func (x *InfoReq) GetId() int64 {
return 0
}
type Region struct {
state protoimpl.MessageState `protogen:"open.v1"`
Province string `protobuf:"bytes,1,opt,name=province,proto3" json:"province,omitempty"`
City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"`
District string `protobuf:"bytes,3,opt,name=district,proto3" json:"district,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Region) Reset() {
*x = Region{}
mi := &file_sale_sale_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Region) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Region) ProtoMessage() {}
func (x *Region) ProtoReflect() protoreflect.Message {
mi := &file_sale_sale_proto_msgTypes[10]
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 Region.ProtoReflect.Descriptor instead.
func (*Region) Descriptor() ([]byte, []int) {
return file_sale_sale_proto_rawDescGZIP(), []int{10}
}
func (x *Region) GetProvince() string {
if x != nil {
return x.Province
}
return ""
}
func (x *Region) GetCity() string {
if x != nil {
return x.City
}
return ""
}
func (x *Region) GetDistrict() string {
if x != nil {
return x.District
}
return ""
}
type GroupItem struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GroupItem) Reset() {
*x = GroupItem{}
mi := &file_sale_sale_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GroupItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GroupItem) ProtoMessage() {}
func (x *GroupItem) ProtoReflect() protoreflect.Message {
mi := &file_sale_sale_proto_msgTypes[11]
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 GroupItem.ProtoReflect.Descriptor instead.
func (*GroupItem) Descriptor() ([]byte, []int) {
return file_sale_sale_proto_rawDescGZIP(), []int{11}
}
func (x *GroupItem) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *GroupItem) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type InfoData struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
SaleId int64 `protobuf:"varint,2,opt,name=sale_id,json=saleId,proto3" json:"sale_id,omitempty"`
Mobile string `protobuf:"bytes,3,opt,name=mobile,proto3" json:"mobile,omitempty"`
OriginMobile string `protobuf:"bytes,4,opt,name=origin_mobile,json=originMobile,proto3" json:"origin_mobile,omitempty"`
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
IdCardFront string `protobuf:"bytes,6,opt,name=id_card_front,json=idCardFront,proto3" json:"id_card_front,omitempty"`
IdCardBack string `protobuf:"bytes,7,opt,name=id_card_back,json=idCardBack,proto3" json:"id_card_back,omitempty"`
BusinessLicense string `protobuf:"bytes,8,opt,name=business_license,json=businessLicense,proto3" json:"business_license,omitempty"`
Region *Region `protobuf:"bytes,9,opt,name=region,proto3" json:"region,omitempty"`
ProvinceId int64 `protobuf:"varint,10,opt,name=province_id,json=provinceId,proto3" json:"province_id,omitempty"`
CityId int64 `protobuf:"varint,11,opt,name=city_id,json=cityId,proto3" json:"city_id,omitempty"`
DistrictId int64 `protobuf:"varint,12,opt,name=district_id,json=districtId,proto3" json:"district_id,omitempty"`
TerritoryId int64 `protobuf:"varint,13,opt,name=territory_id,json=territoryId,proto3" json:"territory_id,omitempty"`
TerritoryName string `protobuf:"bytes,14,opt,name=territory_name,json=territoryName,proto3" json:"territory_name,omitempty"`
GroupId int64 `protobuf:"varint,15,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
Address string `protobuf:"bytes,16,opt,name=address,proto3" json:"address,omitempty"`
Status uint32 `protobuf:"varint,17,opt,name=status,proto3" json:"status,omitempty"`
Avatar string `protobuf:"bytes,18,opt,name=avatar,proto3" json:"avatar,omitempty"`
Account string `protobuf:"bytes,19,opt,name=account,proto3" json:"account,omitempty"`
Type uint32 `protobuf:"varint,20,opt,name=type,proto3" json:"type,omitempty"`
Sex uint32 `protobuf:"varint,21,opt,name=sex,proto3" json:"sex,omitempty"`
BirthDate string `protobuf:"bytes,22,opt,name=birth_date,json=birthDate,proto3" json:"birth_date,omitempty"`
Reason string `protobuf:"bytes,23,opt,name=reason,proto3" json:"reason,omitempty"`
AdminId int64 `protobuf:"varint,24,opt,name=admin_id,json=adminId,proto3" json:"admin_id,omitempty"`
AdminName string `protobuf:"bytes,25,opt,name=admin_name,json=adminName,proto3" json:"admin_name,omitempty"`
CreateTime string `protobuf:"bytes,26,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
UpdateTime string `protobuf:"bytes,27,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
Group *GroupItem `protobuf:"bytes,28,opt,name=group,proto3" json:"group,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *InfoData) Reset() {
*x = InfoData{}
mi := &file_sale_sale_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *InfoData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InfoData) ProtoMessage() {}
func (x *InfoData) ProtoReflect() protoreflect.Message {
mi := &file_sale_sale_proto_msgTypes[12]
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 InfoData.ProtoReflect.Descriptor instead.
func (*InfoData) Descriptor() ([]byte, []int) {
return file_sale_sale_proto_rawDescGZIP(), []int{12}
}
func (x *InfoData) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *InfoData) GetSaleId() int64 {
if x != nil {
return x.SaleId
}
return 0
}
func (x *InfoData) GetMobile() string {
if x != nil {
return x.Mobile
}
return ""
}
func (x *InfoData) GetOriginMobile() string {
if x != nil {
return x.OriginMobile
}
return ""
}
func (x *InfoData) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *InfoData) GetIdCardFront() string {
if x != nil {
return x.IdCardFront
}
return ""
}
func (x *InfoData) GetIdCardBack() string {
if x != nil {
return x.IdCardBack
}
return ""
}
func (x *InfoData) GetBusinessLicense() string {
if x != nil {
return x.BusinessLicense
}
return ""
}
func (x *InfoData) GetRegion() *Region {
if x != nil {
return x.Region
}
return nil
}
func (x *InfoData) GetProvinceId() int64 {
if x != nil {
return x.ProvinceId
}
return 0
}
func (x *InfoData) GetCityId() int64 {
if x != nil {
return x.CityId
}
return 0
}
func (x *InfoData) GetDistrictId() int64 {
if x != nil {
return x.DistrictId
}
return 0
}
func (x *InfoData) GetTerritoryId() int64 {
if x != nil {
return x.TerritoryId
}
return 0
}
func (x *InfoData) GetTerritoryName() string {
if x != nil {
return x.TerritoryName
}
return ""
}
func (x *InfoData) GetGroupId() int64 {
if x != nil {
return x.GroupId
}
return 0
}
func (x *InfoData) GetAddress() string {
if x != nil {
return x.Address
}
return ""
}
func (x *InfoData) GetStatus() uint32 {
if x != nil {
return x.Status
}
return 0
}
func (x *InfoData) GetAvatar() string {
if x != nil {
return x.Avatar
}
return ""
}
func (x *InfoData) GetAccount() string {
if x != nil {
return x.Account
}
return ""
}
func (x *InfoData) GetType() uint32 {
if x != nil {
return x.Type
}
return 0
}
func (x *InfoData) GetSex() uint32 {
if x != nil {
return x.Sex
}
return 0
}
func (x *InfoData) GetBirthDate() string {
if x != nil {
return x.BirthDate
}
return ""
}
func (x *InfoData) GetReason() string {
if x != nil {
return x.Reason
}
return ""
}
func (x *InfoData) GetAdminId() int64 {
if x != nil {
return x.AdminId
}
return 0
}
func (x *InfoData) GetAdminName() string {
if x != nil {
return x.AdminName
}
return ""
}
func (x *InfoData) GetCreateTime() string {
if x != nil {
return x.CreateTime
}
return ""
}
func (x *InfoData) GetUpdateTime() string {
if x != nil {
return x.UpdateTime
}
return ""
}
func (x *InfoData) GetGroup() *GroupItem {
if x != nil {
return x.Group
}
return nil
}
type ItemsReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
@@ -852,7 +1224,7 @@ type ItemsReq struct {
func (x *ItemsReq) Reset() {
*x = ItemsReq{}
mi := &file_sale_sale_proto_msgTypes[10]
mi := &file_sale_sale_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -864,7 +1236,7 @@ func (x *ItemsReq) String() string {
func (*ItemsReq) ProtoMessage() {}
func (x *ItemsReq) ProtoReflect() protoreflect.Message {
mi := &file_sale_sale_proto_msgTypes[10]
mi := &file_sale_sale_proto_msgTypes[13]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -877,7 +1249,7 @@ func (x *ItemsReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use ItemsReq.ProtoReflect.Descriptor instead.
func (*ItemsReq) Descriptor() ([]byte, []int) {
return file_sale_sale_proto_rawDescGZIP(), []int{10}
return file_sale_sale_proto_rawDescGZIP(), []int{13}
}
func (x *ItemsReq) GetName() string {
@@ -933,7 +1305,7 @@ type StatusReq struct {
func (x *StatusReq) Reset() {
*x = StatusReq{}
mi := &file_sale_sale_proto_msgTypes[11]
mi := &file_sale_sale_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -945,7 +1317,7 @@ func (x *StatusReq) String() string {
func (*StatusReq) ProtoMessage() {}
func (x *StatusReq) ProtoReflect() protoreflect.Message {
mi := &file_sale_sale_proto_msgTypes[11]
mi := &file_sale_sale_proto_msgTypes[14]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -958,7 +1330,7 @@ func (x *StatusReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use StatusReq.ProtoReflect.Descriptor instead.
func (*StatusReq) Descriptor() ([]byte, []int) {
return file_sale_sale_proto_rawDescGZIP(), []int{11}
return file_sale_sale_proto_rawDescGZIP(), []int{14}
}
func (x *StatusReq) GetId() int64 {
@@ -1065,7 +1437,51 @@ const file_sale_sale_proto_rawDesc = "" +
"idCardBack\x12)\n" +
"\x10business_license\x18\x15 \x01(\tR\x0fbusinessLicense\"\x19\n" +
"\aInfoReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"\x94\x01\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"T\n" +
"\x06Region\x12\x1a\n" +
"\bprovince\x18\x01 \x01(\tR\bprovince\x12\x12\n" +
"\x04city\x18\x02 \x01(\tR\x04city\x12\x1a\n" +
"\bdistrict\x18\x03 \x01(\tR\bdistrict\"/\n" +
"\tGroupItem\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" +
"\x04name\x18\x02 \x01(\tR\x04name\"\xbf\x06\n" +
"\bInfoData\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x17\n" +
"\asale_id\x18\x02 \x01(\x03R\x06saleId\x12\x16\n" +
"\x06mobile\x18\x03 \x01(\tR\x06mobile\x12#\n" +
"\rorigin_mobile\x18\x04 \x01(\tR\foriginMobile\x12\x12\n" +
"\x04name\x18\x05 \x01(\tR\x04name\x12\"\n" +
"\rid_card_front\x18\x06 \x01(\tR\vidCardFront\x12 \n" +
"\fid_card_back\x18\a \x01(\tR\n" +
"idCardBack\x12)\n" +
"\x10business_license\x18\b \x01(\tR\x0fbusinessLicense\x12$\n" +
"\x06region\x18\t \x01(\v2\f.sale.RegionR\x06region\x12\x1f\n" +
"\vprovince_id\x18\n" +
" \x01(\x03R\n" +
"provinceId\x12\x17\n" +
"\acity_id\x18\v \x01(\x03R\x06cityId\x12\x1f\n" +
"\vdistrict_id\x18\f \x01(\x03R\n" +
"districtId\x12!\n" +
"\fterritory_id\x18\r \x01(\x03R\vterritoryId\x12%\n" +
"\x0eterritory_name\x18\x0e \x01(\tR\rterritoryName\x12\x19\n" +
"\bgroup_id\x18\x0f \x01(\x03R\agroupId\x12\x18\n" +
"\aaddress\x18\x10 \x01(\tR\aaddress\x12\x16\n" +
"\x06status\x18\x11 \x01(\rR\x06status\x12\x16\n" +
"\x06avatar\x18\x12 \x01(\tR\x06avatar\x12\x18\n" +
"\aaccount\x18\x13 \x01(\tR\aaccount\x12\x12\n" +
"\x04type\x18\x14 \x01(\rR\x04type\x12\x10\n" +
"\x03sex\x18\x15 \x01(\rR\x03sex\x12\x1d\n" +
"\n" +
"birth_date\x18\x16 \x01(\tR\tbirthDate\x12\x16\n" +
"\x06reason\x18\x17 \x01(\tR\x06reason\x12\x19\n" +
"\badmin_id\x18\x18 \x01(\x03R\aadminId\x12\x1d\n" +
"\n" +
"admin_name\x18\x19 \x01(\tR\tadminName\x12\x1f\n" +
"\vcreate_time\x18\x1a \x01(\tR\n" +
"createTime\x12\x1f\n" +
"\vupdate_time\x18\x1b \x01(\tR\n" +
"updateTime\x12%\n" +
"\x05group\x18\x1c \x01(\v2\x0f.sale.GroupItemR\x05group\"\x94\x01\n" +
"\bItemsReq\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
"\x04page\x18\x02 \x01(\rR\x04page\x12\x1b\n" +
@@ -1076,7 +1492,7 @@ const file_sale_sale_proto_rawDesc = "" +
"\tStatusReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x16\n" +
"\x06status\x18\x02 \x01(\rR\x06status\x12\x16\n" +
"\x06reason\x18\x03 \x01(\tR\x06reason2\xbf\x06\n" +
"\x06reason\x18\x03 \x01(\tR\x06reason2\xee\x06\n" +
"\x04Sale\x12S\n" +
"\n" +
"GroupItems\x12\x13.sale.GroupItemsReq\x1a\x0e.sale.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\x12\x15/admin/v3/sales/group\x12U\n" +
@@ -1088,7 +1504,8 @@ const file_sale_sale_proto_rawDesc = "" +
"\rNamesInternal\x12\x0e.sale.NamesReq\x1a\x0f.sale.NamesData\x12E\n" +
"\x06Create\x12\x0f.sale.CreateReq\x1a\x0e.sale.Response\"\x1a\x82\xd3\xe4\x93\x02\x14:\x01*\"\x0f/admin/v3/sales\x12A\n" +
"\x04Edit\x12\r.sale.EditReq\x1a\x0e.sale.Response\"\x1a\x82\xd3\xe4\x93\x02\x14:\x01*\x1a\x0f/admin/v3/sales\x12F\n" +
"\x04Info\x12\r.sale.InfoReq\x1a\x0e.sale.Response\"\x1f\x82\xd3\xe4\x93\x02\x19:\x01*\x12\x14/admin/v3/sales/info\x12C\n" +
"\x04Info\x12\r.sale.InfoReq\x1a\x0e.sale.Response\"\x1f\x82\xd3\xe4\x93\x02\x19:\x01*\x12\x14/admin/v3/sales/info\x12-\n" +
"\fInfoInternal\x12\r.sale.InfoReq\x1a\x0e.sale.InfoData\x12C\n" +
"\x05Items\x12\x0e.sale.ItemsReq\x1a\x0e.sale.Response\"\x1a\x82\xd3\xe4\x93\x02\x14:\x01*\x12\x0f/admin/v3/sales\x12L\n" +
"\x06Status\x12\x0f.sale.StatusReq\x1a\x0e.sale.Response\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\x1a\x16/admin/v3/sales/statusB\x18Z\x16lone-services/rpc/saleb\x06proto3"
@@ -1104,7 +1521,7 @@ func file_sale_sale_proto_rawDescGZIP() []byte {
return file_sale_sale_proto_rawDescData
}
var file_sale_sale_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_sale_sale_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_sale_sale_proto_goTypes = []any{
(*Response)(nil), // 0: sale.Response
(*GroupEmptyReq)(nil), // 1: sale.GroupEmptyReq
@@ -1116,38 +1533,45 @@ var file_sale_sale_proto_goTypes = []any{
(*CreateReq)(nil), // 7: sale.CreateReq
(*EditReq)(nil), // 8: sale.EditReq
(*InfoReq)(nil), // 9: sale.InfoReq
(*ItemsReq)(nil), // 10: sale.ItemsReq
(*StatusReq)(nil), // 11: sale.StatusReq
(*Region)(nil), // 10: sale.Region
(*GroupItem)(nil), // 11: sale.GroupItem
(*InfoData)(nil), // 12: sale.InfoData
(*ItemsReq)(nil), // 13: sale.ItemsReq
(*StatusReq)(nil), // 14: sale.StatusReq
}
var file_sale_sale_proto_depIdxs = []int32{
5, // 0: sale.NamesData.items:type_name -> sale.NameItem
2, // 1: sale.Sale.GroupItems:input_type -> sale.GroupItemsReq
3, // 2: sale.Sale.GroupCreate:input_type -> sale.GroupCreateReq
1, // 3: sale.Sale.GroupNames:input_type -> sale.GroupEmptyReq
1, // 4: sale.Sale.Types:input_type -> sale.GroupEmptyReq
4, // 5: sale.Sale.Names:input_type -> sale.NamesReq
4, // 6: sale.Sale.NamesInternal:input_type -> sale.NamesReq
7, // 7: sale.Sale.Create:input_type -> sale.CreateReq
8, // 8: sale.Sale.Edit:input_type -> sale.EditReq
9, // 9: sale.Sale.Info:input_type -> sale.InfoReq
10, // 10: sale.Sale.Items:input_type -> sale.ItemsReq
11, // 11: sale.Sale.Status:input_type -> sale.StatusReq
0, // 12: sale.Sale.GroupItems:output_type -> sale.Response
0, // 13: sale.Sale.GroupCreate:output_type -> sale.Response
0, // 14: sale.Sale.GroupNames:output_type -> sale.Response
0, // 15: sale.Sale.Types:output_type -> sale.Response
0, // 16: sale.Sale.Names:output_type -> sale.Response
6, // 17: sale.Sale.NamesInternal:output_type -> sale.NamesData
0, // 18: sale.Sale.Create:output_type -> sale.Response
0, // 19: sale.Sale.Edit:output_type -> sale.Response
0, // 20: sale.Sale.Info:output_type -> sale.Response
0, // 21: sale.Sale.Items:output_type -> sale.Response
0, // 22: sale.Sale.Status:output_type -> sale.Response
12, // [12:23] is the sub-list for method output_type
1, // [1:12] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
10, // 1: sale.InfoData.region:type_name -> sale.Region
11, // 2: sale.InfoData.group:type_name -> sale.GroupItem
2, // 3: sale.Sale.GroupItems:input_type -> sale.GroupItemsReq
3, // 4: sale.Sale.GroupCreate:input_type -> sale.GroupCreateReq
1, // 5: sale.Sale.GroupNames:input_type -> sale.GroupEmptyReq
1, // 6: sale.Sale.Types:input_type -> sale.GroupEmptyReq
4, // 7: sale.Sale.Names:input_type -> sale.NamesReq
4, // 8: sale.Sale.NamesInternal:input_type -> sale.NamesReq
7, // 9: sale.Sale.Create:input_type -> sale.CreateReq
8, // 10: sale.Sale.Edit:input_type -> sale.EditReq
9, // 11: sale.Sale.Info:input_type -> sale.InfoReq
9, // 12: sale.Sale.InfoInternal:input_type -> sale.InfoReq
13, // 13: sale.Sale.Items:input_type -> sale.ItemsReq
14, // 14: sale.Sale.Status:input_type -> sale.StatusReq
0, // 15: sale.Sale.GroupItems:output_type -> sale.Response
0, // 16: sale.Sale.GroupCreate:output_type -> sale.Response
0, // 17: sale.Sale.GroupNames:output_type -> sale.Response
0, // 18: sale.Sale.Types:output_type -> sale.Response
0, // 19: sale.Sale.Names:output_type -> sale.Response
6, // 20: sale.Sale.NamesInternal:output_type -> sale.NamesData
0, // 21: sale.Sale.Create:output_type -> sale.Response
0, // 22: sale.Sale.Edit:output_type -> sale.Response
0, // 23: sale.Sale.Info:output_type -> sale.Response
12, // 24: sale.Sale.InfoInternal:output_type -> sale.InfoData
0, // 25: sale.Sale.Items:output_type -> sale.Response
0, // 26: sale.Sale.Status:output_type -> sale.Response
15, // [15:27] is the sub-list for method output_type
3, // [3:15] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_sale_sale_proto_init() }
@@ -1161,7 +1585,7 @@ func file_sale_sale_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_sale_sale_proto_rawDesc), len(file_sale_sale_proto_rawDesc)),
NumEnums: 0,
NumMessages: 12,
NumMessages: 15,
NumExtensions: 0,
NumServices: 1,
},
+40
View File
@@ -28,6 +28,7 @@ const (
Sale_Create_FullMethodName = "/sale.Sale/Create"
Sale_Edit_FullMethodName = "/sale.Sale/Edit"
Sale_Info_FullMethodName = "/sale.Sale/Info"
Sale_InfoInternal_FullMethodName = "/sale.Sale/InfoInternal"
Sale_Items_FullMethodName = "/sale.Sale/Items"
Sale_Status_FullMethodName = "/sale.Sale/Status"
)
@@ -47,6 +48,8 @@ type SaleClient interface {
Create(ctx context.Context, in *CreateReq, opts ...grpc.CallOption) (*Response, error)
Edit(ctx context.Context, in *EditReq, opts ...grpc.CallOption) (*Response, error)
Info(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*Response, error)
// 服务间调用:销售详情(含分组;mobile 脱敏,origin_mobile 为加密串)
InfoInternal(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*InfoData, error)
Items(ctx context.Context, in *ItemsReq, opts ...grpc.CallOption) (*Response, error)
Status(ctx context.Context, in *StatusReq, opts ...grpc.CallOption) (*Response, error)
}
@@ -149,6 +152,16 @@ func (c *saleClient) Info(ctx context.Context, in *InfoReq, opts ...grpc.CallOpt
return out, nil
}
func (c *saleClient) InfoInternal(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*InfoData, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(InfoData)
err := c.cc.Invoke(ctx, Sale_InfoInternal_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *saleClient) Items(ctx context.Context, in *ItemsReq, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
@@ -184,6 +197,8 @@ type SaleServer interface {
Create(context.Context, *CreateReq) (*Response, error)
Edit(context.Context, *EditReq) (*Response, error)
Info(context.Context, *InfoReq) (*Response, error)
// 服务间调用:销售详情(含分组;mobile 脱敏,origin_mobile 为加密串)
InfoInternal(context.Context, *InfoReq) (*InfoData, error)
Items(context.Context, *ItemsReq) (*Response, error)
Status(context.Context, *StatusReq) (*Response, error)
mustEmbedUnimplementedSaleServer()
@@ -223,6 +238,9 @@ func (UnimplementedSaleServer) Edit(context.Context, *EditReq) (*Response, error
func (UnimplementedSaleServer) Info(context.Context, *InfoReq) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method Info not implemented")
}
func (UnimplementedSaleServer) InfoInternal(context.Context, *InfoReq) (*InfoData, error) {
return nil, status.Error(codes.Unimplemented, "method InfoInternal not implemented")
}
func (UnimplementedSaleServer) Items(context.Context, *ItemsReq) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method Items not implemented")
}
@@ -412,6 +430,24 @@ func _Sale_Info_Handler(srv interface{}, ctx context.Context, dec func(interface
return interceptor(ctx, in, info, handler)
}
func _Sale_InfoInternal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InfoReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SaleServer).InfoInternal(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Sale_InfoInternal_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SaleServer).InfoInternal(ctx, req.(*InfoReq))
}
return interceptor(ctx, in, info, handler)
}
func _Sale_Items_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ItemsReq)
if err := dec(in); err != nil {
@@ -491,6 +527,10 @@ var Sale_ServiceDesc = grpc.ServiceDesc{
MethodName: "Info",
Handler: _Sale_Info_Handler,
},
{
MethodName: "InfoInternal",
Handler: _Sale_InfoInternal_Handler,
},
{
MethodName: "Items",
Handler: _Sale_Items_Handler,