refactor: reorganize modules and add Linux build tooling
This commit is contained in:
81
module/ec/delivery/external/client/team/team.go
vendored
Normal file
81
module/ec/delivery/external/client/team/team.go
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// Source: delivery.proto
|
||||
|
||||
package team
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"bsm/full/module/ec/delivery/external/pb/delivery"
|
||||
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type (
|
||||
CarItem = delivery.CarItem
|
||||
CarListReply = delivery.CarListReply
|
||||
Empty = delivery.Empty
|
||||
FetchRequest = delivery.FetchRequest
|
||||
IdentRequest = delivery.IdentRequest
|
||||
MemberItem = delivery.MemberItem
|
||||
MemberListReply = delivery.MemberListReply
|
||||
SearchRequest = delivery.SearchRequest
|
||||
StatusReply = delivery.StatusReply
|
||||
TeamItem = delivery.TeamItem
|
||||
TeamListReply = delivery.TeamListReply
|
||||
VersionRequest = delivery.VersionRequest
|
||||
|
||||
Team interface {
|
||||
// 配送团队列表
|
||||
TeamList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*TeamListReply, error)
|
||||
// 添加配送团队
|
||||
TeamAdd(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 配送团队详情
|
||||
TeamGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*TeamItem, error)
|
||||
// 修改配送团队信息
|
||||
TeamSet(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 删除配送团队
|
||||
TeamDel(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
}
|
||||
|
||||
defaultTeam struct {
|
||||
cli zrpc.Client
|
||||
}
|
||||
)
|
||||
|
||||
func NewTeam(cli zrpc.Client) Team {
|
||||
return &defaultTeam{
|
||||
cli: cli,
|
||||
}
|
||||
}
|
||||
|
||||
// 配送团队列表
|
||||
func (m *defaultTeam) TeamList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*TeamListReply, error) {
|
||||
client := delivery.NewTeamClient(m.cli.Conn())
|
||||
return client.TeamList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 添加配送团队
|
||||
func (m *defaultTeam) TeamAdd(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
client := delivery.NewTeamClient(m.cli.Conn())
|
||||
return client.TeamAdd(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 配送团队详情
|
||||
func (m *defaultTeam) TeamGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*TeamItem, error) {
|
||||
client := delivery.NewTeamClient(m.cli.Conn())
|
||||
return client.TeamGet(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 修改配送团队信息
|
||||
func (m *defaultTeam) TeamSet(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
client := delivery.NewTeamClient(m.cli.Conn())
|
||||
return client.TeamSet(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 删除配送团队
|
||||
func (m *defaultTeam) TeamDel(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
client := delivery.NewTeamClient(m.cli.Conn())
|
||||
return client.TeamDel(ctx, in, opts...)
|
||||
}
|
||||
Reference in New Issue
Block a user