refactor: localize protobuf definitions
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"bsm/full/module/ec/market/internal/logic/supply"
|
||||
pb "bsm/full/module/ec/market/pb"
|
||||
"context"
|
||||
)
|
||||
|
||||
type SupplyServer struct {
|
||||
@@ -16,7 +16,7 @@ func NewSupplyServer() *SupplyServer {
|
||||
}
|
||||
|
||||
// 新增供应商
|
||||
func (s *SupplyServer) Create(ctx context.Context, in *pb.MarketSupplyItem) (*pb.StatusReply, error) {
|
||||
func (s *SupplyServer) Create(ctx context.Context, in *pb.MarketSupplyItem) (*pb.IdentityStatusReply, error) {
|
||||
return supply.Create(ctx, in)
|
||||
}
|
||||
|
||||
@@ -26,16 +26,16 @@ func (s *SupplyServer) Get(ctx context.Context, in *pb.IdentRequest) (*pb.Market
|
||||
}
|
||||
|
||||
// 供应商列表
|
||||
func (s *SupplyServer) Fetch(ctx context.Context, in *pb.FetchRequest) (*pb.SupplyReply, error) {
|
||||
func (s *SupplyServer) Fetch(ctx context.Context, in *pb.MarketFetchRequest) (*pb.SupplyReply, error) {
|
||||
return supply.Fetch(ctx, in)
|
||||
}
|
||||
|
||||
// 更新供应商数据
|
||||
func (s *SupplyServer) Modify(ctx context.Context, in *pb.MarketSupplyItem) (*pb.StatusReply, error) {
|
||||
func (s *SupplyServer) Modify(ctx context.Context, in *pb.MarketSupplyItem) (*pb.IdentityStatusReply, error) {
|
||||
return supply.Modify(ctx, in)
|
||||
}
|
||||
|
||||
// 删除一个供应商
|
||||
func (s *SupplyServer) Delete(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
||||
func (s *SupplyServer) Delete(ctx context.Context, in *pb.IdentRequest) (*pb.IdentityStatusReply, error) {
|
||||
return supply.Delete(ctx, in)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user