refactor: localize protobuf definitions
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"bsm/full/module/ec/market/internal/logic/agency"
|
||||
pb "bsm/full/module/ec/market/pb"
|
||||
"context"
|
||||
)
|
||||
|
||||
type AgencyServer struct {
|
||||
@@ -16,12 +16,12 @@ func NewAgencyServer() *AgencyServer {
|
||||
}
|
||||
|
||||
// 登录
|
||||
func (s *AgencyServer) Login(ctx context.Context, in *pb.LoginRequest) (*pb.LoginReply, error) {
|
||||
func (s *AgencyServer) Login(ctx context.Context, in *pb.LoginRequest) (*pb.MarketLoginReply, error) {
|
||||
return agency.Login(ctx, in)
|
||||
}
|
||||
|
||||
// 新增代理商
|
||||
func (s *AgencyServer) Create(ctx context.Context, in *pb.MarketAgenctyItem) (*pb.StatusReply, error) {
|
||||
func (s *AgencyServer) Create(ctx context.Context, in *pb.MarketAgenctyItem) (*pb.IdentityStatusReply, error) {
|
||||
return agency.Create(ctx, in)
|
||||
}
|
||||
|
||||
@@ -31,31 +31,31 @@ func (s *AgencyServer) Get(ctx context.Context, in *pb.IdentRequest) (*pb.Market
|
||||
}
|
||||
|
||||
// 代理商列表
|
||||
func (s *AgencyServer) Fetch(ctx context.Context, in *pb.FetchRequest) (*pb.AgencyReply, error) {
|
||||
func (s *AgencyServer) Fetch(ctx context.Context, in *pb.MarketFetchRequest) (*pb.AgencyReply, error) {
|
||||
return agency.Fetch(ctx, in)
|
||||
}
|
||||
|
||||
// 更新代理商数据
|
||||
func (s *AgencyServer) Modify(ctx context.Context, in *pb.MarketAgenctyItem) (*pb.StatusReply, error) {
|
||||
func (s *AgencyServer) Modify(ctx context.Context, in *pb.MarketAgenctyItem) (*pb.IdentityStatusReply, error) {
|
||||
return agency.Modify(ctx, in)
|
||||
}
|
||||
|
||||
// 删除一个代理商
|
||||
func (s *AgencyServer) Delete(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
||||
func (s *AgencyServer) Delete(ctx context.Context, in *pb.IdentRequest) (*pb.IdentityStatusReply, error) {
|
||||
return agency.Delete(ctx, in)
|
||||
}
|
||||
|
||||
// 更新密码
|
||||
func (s *AgencyServer) SetPassword(ctx context.Context, in *pb.SetPasswordRequest) (*pb.StatusReply, error) {
|
||||
func (s *AgencyServer) SetPassword(ctx context.Context, in *pb.SetPasswordRequest) (*pb.IdentityStatusReply, error) {
|
||||
return agency.SetPassword(ctx, in)
|
||||
}
|
||||
|
||||
// 待审核
|
||||
func (s *AgencyServer) Pending(ctx context.Context, in *pb.FetchRequest) (*pb.AgencyReply, error) {
|
||||
func (s *AgencyServer) Pending(ctx context.Context, in *pb.MarketFetchRequest) (*pb.AgencyReply, error) {
|
||||
return agency.Pending(ctx, in)
|
||||
}
|
||||
|
||||
// 审核
|
||||
func (s *AgencyServer) Approve(ctx context.Context, in *pb.ApproveRequest) (*pb.StatusReply, error) {
|
||||
func (s *AgencyServer) Approve(ctx context.Context, in *pb.ApproveRequest) (*pb.IdentityStatusReply, error) {
|
||||
return agency.Approve(ctx, in)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user