sale
This commit is contained in:
+97
-50
@@ -83,18 +83,23 @@ func (x *Response) GetData() string {
|
||||
}
|
||||
|
||||
type ApiSaleAddReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Mobile string `protobuf:"bytes,1,opt,name=Mobile,proto3" json:"Mobile,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
|
||||
District string `protobuf:"bytes,3,opt,name=District,proto3" json:"District,omitempty"`
|
||||
Address string `protobuf:"bytes,4,opt,name=Address,proto3" json:"Address,omitempty"`
|
||||
Account string `protobuf:"bytes,5,opt,name=Account,proto3" json:"Account,omitempty"`
|
||||
Credentials string `protobuf:"bytes,6,opt,name=Credentials,proto3" json:"Credentials,omitempty"`
|
||||
Sex int32 `protobuf:"varint,7,opt,name=Sex,proto3" json:"Sex,omitempty"`
|
||||
BirthDate string `protobuf:"bytes,8,opt,name=BirthDate,proto3" json:"BirthDate,omitempty"`
|
||||
Type int32 `protobuf:"varint,9,opt,name=Type,proto3" json:"Type,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Mobile string `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
BusinessLicense string `protobuf:"bytes,3,opt,name=business_license,json=businessLicense,proto3" json:"business_license,omitempty"`
|
||||
Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
|
||||
Account string `protobuf:"bytes,5,opt,name=account,proto3" json:"account,omitempty"`
|
||||
Credentials string `protobuf:"bytes,6,opt,name=credentials,proto3" json:"credentials,omitempty"`
|
||||
Sex int32 `protobuf:"varint,7,opt,name=sex,proto3" json:"sex,omitempty"`
|
||||
BirthDate string `protobuf:"bytes,8,opt,name=birth_date,json=birthDate,proto3" json:"birth_date,omitempty"`
|
||||
Type int32 `protobuf:"varint,9,opt,name=type,proto3" json:"type,omitempty"`
|
||||
IdCardFront string `protobuf:"bytes,10,opt,name=idCard_front,json=idCardFront,proto3" json:"idCard_front,omitempty"`
|
||||
IdCardBack string `protobuf:"bytes,11,opt,name=idCard_back,json=idCardBack,proto3" json:"idCard_back,omitempty"`
|
||||
ProvinceId int64 `protobuf:"varint,12,opt,name=province_id,json=provinceId,proto3" json:"province_id,omitempty"`
|
||||
CityId int64 `protobuf:"varint,13,opt,name=city_id,json=cityId,proto3" json:"city_id,omitempty"`
|
||||
DistrictId int64 `protobuf:"varint,14,opt,name=district_id,json=districtId,proto3" json:"district_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ApiSaleAddReq) Reset() {
|
||||
@@ -141,9 +146,9 @@ func (x *ApiSaleAddReq) GetName() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ApiSaleAddReq) GetDistrict() string {
|
||||
func (x *ApiSaleAddReq) GetBusinessLicense() string {
|
||||
if x != nil {
|
||||
return x.District
|
||||
return x.BusinessLicense
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -190,6 +195,41 @@ func (x *ApiSaleAddReq) GetType() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ApiSaleAddReq) GetIdCardFront() string {
|
||||
if x != nil {
|
||||
return x.IdCardFront
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ApiSaleAddReq) GetIdCardBack() string {
|
||||
if x != nil {
|
||||
return x.IdCardBack
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ApiSaleAddReq) GetProvinceId() int64 {
|
||||
if x != nil {
|
||||
return x.ProvinceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ApiSaleAddReq) GetCityId() int64 {
|
||||
if x != nil {
|
||||
return x.CityId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ApiSaleAddReq) GetDistrictId() int64 {
|
||||
if x != nil {
|
||||
return x.DistrictId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ApiLowerSaleItemsReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
|
||||
@@ -1702,17 +1742,27 @@ const file_sale_sale_proto_rawDesc = "" +
|
||||
"\bResponse\x12\x12\n" +
|
||||
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x10\n" +
|
||||
"\x03msg\x18\x02 \x01(\tR\x03msg\x12\x12\n" +
|
||||
"\x04data\x18\x03 \x01(\tR\x04data\"\xf1\x01\n" +
|
||||
"\x04data\x18\x03 \x01(\tR\x04data\"\xa0\x03\n" +
|
||||
"\rApiSaleAddReq\x12\x16\n" +
|
||||
"\x06Mobile\x18\x01 \x01(\tR\x06Mobile\x12\x12\n" +
|
||||
"\x04Name\x18\x02 \x01(\tR\x04Name\x12\x1a\n" +
|
||||
"\bDistrict\x18\x03 \x01(\tR\bDistrict\x12\x18\n" +
|
||||
"\aAddress\x18\x04 \x01(\tR\aAddress\x12\x18\n" +
|
||||
"\aAccount\x18\x05 \x01(\tR\aAccount\x12 \n" +
|
||||
"\vCredentials\x18\x06 \x01(\tR\vCredentials\x12\x10\n" +
|
||||
"\x03Sex\x18\a \x01(\x05R\x03Sex\x12\x1c\n" +
|
||||
"\tBirthDate\x18\b \x01(\tR\tBirthDate\x12\x12\n" +
|
||||
"\x04Type\x18\t \x01(\x05R\x04Type\"f\n" +
|
||||
"\x06mobile\x18\x01 \x01(\tR\x06mobile\x12\x12\n" +
|
||||
"\x04name\x18\x02 \x01(\tR\x04name\x12)\n" +
|
||||
"\x10business_license\x18\x03 \x01(\tR\x0fbusinessLicense\x12\x18\n" +
|
||||
"\aaddress\x18\x04 \x01(\tR\aaddress\x12\x18\n" +
|
||||
"\aaccount\x18\x05 \x01(\tR\aaccount\x12 \n" +
|
||||
"\vcredentials\x18\x06 \x01(\tR\vcredentials\x12\x10\n" +
|
||||
"\x03sex\x18\a \x01(\x05R\x03sex\x12\x1d\n" +
|
||||
"\n" +
|
||||
"birth_date\x18\b \x01(\tR\tbirthDate\x12\x12\n" +
|
||||
"\x04type\x18\t \x01(\x05R\x04type\x12!\n" +
|
||||
"\fidCard_front\x18\n" +
|
||||
" \x01(\tR\vidCardFront\x12\x1f\n" +
|
||||
"\vidCard_back\x18\v \x01(\tR\n" +
|
||||
"idCardBack\x12\x1f\n" +
|
||||
"\vprovince_id\x18\f \x01(\x03R\n" +
|
||||
"provinceId\x12\x17\n" +
|
||||
"\acity_id\x18\r \x01(\x03R\x06cityId\x12\x1f\n" +
|
||||
"\vdistrict_id\x18\x0e \x01(\x03R\n" +
|
||||
"districtId\"f\n" +
|
||||
"\x14ApiLowerSaleItemsReq\x12\x12\n" +
|
||||
"\x04page\x18\x01 \x01(\x05R\x04page\x12\x12\n" +
|
||||
"\x04size\x18\x02 \x01(\x05R\x04size\x12\x12\n" +
|
||||
@@ -1849,7 +1899,7 @@ const file_sale_sale_proto_rawDesc = "" +
|
||||
"\x0eNamesByIdsData\x12*\n" +
|
||||
"\x05items\x18\x01 \x03(\v2\x14.sale.NamesByIdsItemR\x05items\"\n" +
|
||||
"\n" +
|
||||
"\bEmptyReq2\xde\t\n" +
|
||||
"\bEmptyReq2\x90\t\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" +
|
||||
@@ -1866,8 +1916,7 @@ const file_sale_sale_proto_rawDesc = "" +
|
||||
"\x06Status\x12\x0f.sale.StatusReq\x1a\x0e.sale.Response\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\x1a\x16/admin/v3/sales/status\x12O\n" +
|
||||
"\n" +
|
||||
"ApiSaleAdd\x12\x13.sale.ApiSaleAddReq\x1a\x0e.sale.Response\"\x1c\x82\xd3\xe4\x93\x02\x16:\x01*\x1a\x11/api/v3/sales/add\x12_\n" +
|
||||
"\x11ApiLowerSaleItems\x12\x1a.sale.ApiLowerSaleItemsReq\x1a\x0e.sale.Response\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\x1a\x13/api/v3/sales/lower\x12L\n" +
|
||||
"\vApiSaleInfo\x12\x0e.sale.EmptyReq\x1a\x0e.sale.Response\"\x1d\x82\xd3\xe4\x93\x02\x17:\x01*\x1a\x12/api/v3/sales/info\x12-\n" +
|
||||
"\x11ApiLowerSaleItems\x12\x1a.sale.ApiLowerSaleItemsReq\x1a\x0e.sale.Response\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\x1a\x13/api/v3/sales/lower\x12-\n" +
|
||||
"\fInfoInternal\x12\r.sale.InfoReq\x1a\x0e.sale.InfoData\x125\n" +
|
||||
"\fInfoByUserId\x12\x15.sale.InfoByUserIdReq\x1a\x0e.sale.InfoData\x127\n" +
|
||||
"\n" +
|
||||
@@ -1928,29 +1977,27 @@ var file_sale_sale_proto_depIdxs = []int32{
|
||||
17, // 14: sale.Sale.Status:input_type -> sale.StatusReq
|
||||
1, // 15: sale.Sale.ApiSaleAdd:input_type -> sale.ApiSaleAddReq
|
||||
2, // 16: sale.Sale.ApiLowerSaleItems:input_type -> sale.ApiLowerSaleItemsReq
|
||||
21, // 17: sale.Sale.ApiSaleInfo:input_type -> sale.EmptyReq
|
||||
11, // 18: sale.Sale.InfoInternal:input_type -> sale.InfoReq
|
||||
12, // 19: sale.Sale.InfoByUserId:input_type -> sale.InfoByUserIdReq
|
||||
18, // 20: sale.Sale.NamesByIds:input_type -> sale.NamesByIdsReq
|
||||
0, // 21: sale.Sale.GroupItems:output_type -> sale.Response
|
||||
0, // 22: sale.Sale.GroupCreate:output_type -> sale.Response
|
||||
0, // 23: sale.Sale.GroupNames:output_type -> sale.Response
|
||||
0, // 24: sale.Sale.Types:output_type -> sale.Response
|
||||
0, // 25: sale.Sale.Names:output_type -> sale.Response
|
||||
8, // 26: sale.Sale.NamesInternal:output_type -> sale.NamesData
|
||||
0, // 27: sale.Sale.Create:output_type -> sale.Response
|
||||
0, // 28: sale.Sale.Edit:output_type -> sale.Response
|
||||
0, // 29: sale.Sale.Info:output_type -> sale.Response
|
||||
0, // 30: sale.Sale.Items:output_type -> sale.Response
|
||||
0, // 31: sale.Sale.Status:output_type -> sale.Response
|
||||
0, // 32: sale.Sale.ApiSaleAdd:output_type -> sale.Response
|
||||
0, // 33: sale.Sale.ApiLowerSaleItems:output_type -> sale.Response
|
||||
0, // 34: sale.Sale.ApiSaleInfo:output_type -> sale.Response
|
||||
15, // 35: sale.Sale.InfoInternal:output_type -> sale.InfoData
|
||||
15, // 36: sale.Sale.InfoByUserId:output_type -> sale.InfoData
|
||||
20, // 37: sale.Sale.NamesByIds:output_type -> sale.NamesByIdsData
|
||||
21, // [21:38] is the sub-list for method output_type
|
||||
4, // [4:21] is the sub-list for method input_type
|
||||
11, // 17: sale.Sale.InfoInternal:input_type -> sale.InfoReq
|
||||
12, // 18: sale.Sale.InfoByUserId:input_type -> sale.InfoByUserIdReq
|
||||
18, // 19: sale.Sale.NamesByIds:input_type -> sale.NamesByIdsReq
|
||||
0, // 20: sale.Sale.GroupItems:output_type -> sale.Response
|
||||
0, // 21: sale.Sale.GroupCreate:output_type -> sale.Response
|
||||
0, // 22: sale.Sale.GroupNames:output_type -> sale.Response
|
||||
0, // 23: sale.Sale.Types:output_type -> sale.Response
|
||||
0, // 24: sale.Sale.Names:output_type -> sale.Response
|
||||
8, // 25: sale.Sale.NamesInternal:output_type -> sale.NamesData
|
||||
0, // 26: sale.Sale.Create:output_type -> sale.Response
|
||||
0, // 27: sale.Sale.Edit:output_type -> sale.Response
|
||||
0, // 28: sale.Sale.Info:output_type -> sale.Response
|
||||
0, // 29: sale.Sale.Items:output_type -> sale.Response
|
||||
0, // 30: sale.Sale.Status:output_type -> sale.Response
|
||||
0, // 31: sale.Sale.ApiSaleAdd:output_type -> sale.Response
|
||||
0, // 32: sale.Sale.ApiLowerSaleItems:output_type -> sale.Response
|
||||
15, // 33: sale.Sale.InfoInternal:output_type -> sale.InfoData
|
||||
15, // 34: sale.Sale.InfoByUserId:output_type -> sale.InfoData
|
||||
20, // 35: sale.Sale.NamesByIds:output_type -> sale.NamesByIdsData
|
||||
20, // [20:36] is the sub-list for method output_type
|
||||
4, // [4:20] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
|
||||
@@ -32,7 +32,6 @@ const (
|
||||
Sale_Status_FullMethodName = "/sale.Sale/Status"
|
||||
Sale_ApiSaleAdd_FullMethodName = "/sale.Sale/ApiSaleAdd"
|
||||
Sale_ApiLowerSaleItems_FullMethodName = "/sale.Sale/ApiLowerSaleItems"
|
||||
Sale_ApiSaleInfo_FullMethodName = "/sale.Sale/ApiSaleInfo"
|
||||
Sale_InfoInternal_FullMethodName = "/sale.Sale/InfoInternal"
|
||||
Sale_InfoByUserId_FullMethodName = "/sale.Sale/InfoByUserId"
|
||||
Sale_NamesByIds_FullMethodName = "/sale.Sale/NamesByIds"
|
||||
@@ -58,7 +57,6 @@ type SaleClient interface {
|
||||
// ********************API************************
|
||||
ApiSaleAdd(ctx context.Context, in *ApiSaleAddReq, opts ...grpc.CallOption) (*Response, error)
|
||||
ApiLowerSaleItems(ctx context.Context, in *ApiLowerSaleItemsReq, opts ...grpc.CallOption) (*Response, error)
|
||||
ApiSaleInfo(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*Response, error)
|
||||
// 销售详情
|
||||
InfoInternal(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*InfoData, error)
|
||||
// 按 user_id 查销售详情(内部)
|
||||
@@ -205,16 +203,6 @@ func (c *saleClient) ApiLowerSaleItems(ctx context.Context, in *ApiLowerSaleItem
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *saleClient) ApiSaleInfo(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, Sale_ApiSaleInfo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
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)
|
||||
@@ -265,7 +253,6 @@ type SaleServer interface {
|
||||
// ********************API************************
|
||||
ApiSaleAdd(context.Context, *ApiSaleAddReq) (*Response, error)
|
||||
ApiLowerSaleItems(context.Context, *ApiLowerSaleItemsReq) (*Response, error)
|
||||
ApiSaleInfo(context.Context, *EmptyReq) (*Response, error)
|
||||
// 销售详情
|
||||
InfoInternal(context.Context, *InfoReq) (*InfoData, error)
|
||||
// 按 user_id 查销售详情(内部)
|
||||
@@ -321,9 +308,6 @@ func (UnimplementedSaleServer) ApiSaleAdd(context.Context, *ApiSaleAddReq) (*Res
|
||||
func (UnimplementedSaleServer) ApiLowerSaleItems(context.Context, *ApiLowerSaleItemsReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ApiLowerSaleItems not implemented")
|
||||
}
|
||||
func (UnimplementedSaleServer) ApiSaleInfo(context.Context, *EmptyReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ApiSaleInfo not implemented")
|
||||
}
|
||||
func (UnimplementedSaleServer) InfoInternal(context.Context, *InfoReq) (*InfoData, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method InfoInternal not implemented")
|
||||
}
|
||||
@@ -588,24 +572,6 @@ func _Sale_ApiLowerSaleItems_Handler(srv interface{}, ctx context.Context, dec f
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Sale_ApiSaleInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(EmptyReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SaleServer).ApiSaleInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Sale_ApiSaleInfo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SaleServer).ApiSaleInfo(ctx, req.(*EmptyReq))
|
||||
}
|
||||
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 {
|
||||
@@ -719,10 +685,6 @@ var Sale_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "ApiLowerSaleItems",
|
||||
Handler: _Sale_ApiLowerSaleItems_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ApiSaleInfo",
|
||||
Handler: _Sale_ApiSaleInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "InfoInternal",
|
||||
Handler: _Sale_InfoInternal_Handler,
|
||||
|
||||
Binary file not shown.
+15
-15
@@ -82,12 +82,6 @@ service Sale {
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
rpc ApiSaleInfo(EmptyReq) returns (Response) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/v3/sales/info"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// 销售详情
|
||||
rpc InfoInternal(InfoReq) returns (InfoData);
|
||||
@@ -104,17 +98,23 @@ message Response {
|
||||
}
|
||||
|
||||
message ApiSaleAddReq {
|
||||
string Mobile = 1;
|
||||
string Name = 2;
|
||||
string District = 3;
|
||||
string Address = 4;
|
||||
string Account = 5;
|
||||
string Credentials = 6;
|
||||
int32 Sex = 7;
|
||||
string BirthDate = 8;
|
||||
int32 Type = 9;
|
||||
string mobile = 1;
|
||||
string name = 2;
|
||||
string business_license = 3;
|
||||
string address = 4;
|
||||
string account = 5;
|
||||
string credentials = 6;
|
||||
int32 sex = 7;
|
||||
string birth_date = 8;
|
||||
int32 type = 9;
|
||||
string idCard_front = 10;
|
||||
string idCard_back = 11;
|
||||
int64 province_id = 12;
|
||||
int64 city_id = 13;
|
||||
int64 district_id = 14;
|
||||
}
|
||||
|
||||
|
||||
message ApiLowerSaleItemsReq {
|
||||
int32 page = 1;
|
||||
int32 size = 2;
|
||||
|
||||
Reference in New Issue
Block a user