refactor: localize protobuf definitions
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"bsm/full/module/ec/mall/internal/logic/freight"
|
||||
pb "bsm/full/module/ec/mall/pb"
|
||||
"context"
|
||||
)
|
||||
|
||||
type FreightServer struct {
|
||||
@@ -16,22 +16,22 @@ func NewFreightServer() *FreightServer {
|
||||
}
|
||||
|
||||
// 运费模板列表
|
||||
func (s *FreightServer) Fetch(ctx context.Context, in *pb.FetchRequest) (*pb.FreightReply, error) {
|
||||
func (s *FreightServer) Fetch(ctx context.Context, in *pb.MallFetchRequest) (*pb.FreightReply, error) {
|
||||
return freight.Fetch(ctx, in)
|
||||
}
|
||||
|
||||
// 运费模板修改
|
||||
func (s *FreightServer) Modify(ctx context.Context, in *pb.FreightItem) (*pb.StatusReply, error) {
|
||||
func (s *FreightServer) Modify(ctx context.Context, in *pb.FreightItem) (*pb.IdentityStatusReply, error) {
|
||||
return freight.Modify(ctx, in)
|
||||
}
|
||||
|
||||
// 运费模板删除
|
||||
func (s *FreightServer) Delete(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
||||
func (s *FreightServer) Delete(ctx context.Context, in *pb.IdentRequest) (*pb.IdentityStatusReply, error) {
|
||||
return freight.Delete(ctx, in)
|
||||
}
|
||||
|
||||
// 运费模板创建
|
||||
func (s *FreightServer) Create(ctx context.Context, in *pb.FreightItem) (*pb.StatusReply, error) {
|
||||
func (s *FreightServer) Create(ctx context.Context, in *pb.FreightItem) (*pb.IdentityStatusReply, error) {
|
||||
return freight.Create(ctx, in)
|
||||
}
|
||||
|
||||
@@ -41,21 +41,21 @@ func (s *FreightServer) Detail(ctx context.Context, in *pb.IdentRequest) (*pb.Fr
|
||||
}
|
||||
|
||||
// 限制区域列表
|
||||
func (s *FreightServer) DenyRegionFetch(ctx context.Context, in *pb.FetchRequest) (*pb.DenyRegionReply, error) {
|
||||
func (s *FreightServer) DenyRegionFetch(ctx context.Context, in *pb.MallFetchRequest) (*pb.DenyRegionReply, error) {
|
||||
return freight.DenyRegionFetch(ctx, in)
|
||||
}
|
||||
|
||||
// 新建限制区域
|
||||
func (s *FreightServer) DenyRegionCreate(ctx context.Context, in *pb.DenyRegionItem) (*pb.StatusReply, error) {
|
||||
func (s *FreightServer) DenyRegionCreate(ctx context.Context, in *pb.DenyRegionItem) (*pb.IdentityStatusReply, error) {
|
||||
return freight.DenyRegionCreate(ctx, in)
|
||||
}
|
||||
|
||||
// 移除限制区域
|
||||
func (s *FreightServer) DenyRegionDelete(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
||||
func (s *FreightServer) DenyRegionDelete(ctx context.Context, in *pb.IdentRequest) (*pb.IdentityStatusReply, error) {
|
||||
return freight.DenyRegionDelete(ctx, in)
|
||||
}
|
||||
|
||||
// 编辑限制区域
|
||||
func (s *FreightServer) DenyRegionModify(ctx context.Context, in *pb.DenyRegionItem) (*pb.StatusReply, error) {
|
||||
func (s *FreightServer) DenyRegionModify(ctx context.Context, in *pb.DenyRegionItem) (*pb.IdentityStatusReply, error) {
|
||||
return freight.DenyRegionModify(ctx, in)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user