refactor: localize protobuf definitions

This commit is contained in:
2026-08-09 20:14:57 +08:00
parent 9f6f318bbb
commit 5ea45a76fe
429 changed files with 54058 additions and 61623 deletions

View File

@@ -12,7 +12,7 @@ import (
)
// 新增供应商
func Create(ctx context.Context, in *pb.MarketSupplyItem) (reply *pb.StatusReply, err error) {
func Create(ctx context.Context, in *pb.MarketSupplyItem) (reply *pb.IdentityStatusReply, err error) {
// parse authorization meta.
// _, err = service.ParseMetaCtx(ctx, nil)
// if err != nil {
@@ -38,7 +38,7 @@ func Create(ctx context.Context, in *pb.MarketSupplyItem) (reply *pb.StatusReply
return nil, err
}
return &pb.StatusReply{
return &pb.IdentityStatusReply{
Code: 0,
Message: "OK",
Identity: mktModel.Identity,

View File

@@ -12,7 +12,7 @@ import (
)
// 删除一个供应商
func Delete(ctx context.Context, in *pb.IdentRequest) (reply *pb.StatusReply, err error) {
func Delete(ctx context.Context, in *pb.IdentRequest) (reply *pb.IdentityStatusReply, err error) {
// parse authorization meta.
_, err = service.ParseMetaCtx(ctx, nil)
if err != nil {
@@ -29,7 +29,7 @@ func Delete(ctx context.Context, in *pb.IdentRequest) (reply *pb.StatusReply, er
return nil, err
}
return &pb.StatusReply{
return &pb.IdentityStatusReply{
Code: 0,
Message: "OK",
Timeseq: time.Now().UnixNano(),

View File

@@ -11,7 +11,7 @@ import (
)
// 供应商列表
func Fetch(ctx context.Context, in *pb.FetchRequest) (reply *pb.SupplyReply, err error) {
func Fetch(ctx context.Context, in *pb.MarketFetchRequest) (reply *pb.SupplyReply, err error) {
var (
cnt int64 = 0
Offset int64 = (in.GetPageNo() - 1) * in.GetPageSize()

View File

@@ -12,7 +12,7 @@ import (
)
// 更新供应商数据
func Modify(ctx context.Context, in *pb.MarketSupplyItem) (reply *pb.StatusReply, err error) {
func Modify(ctx context.Context, in *pb.MarketSupplyItem) (reply *pb.IdentityStatusReply, err error) {
_, err = service.ParseMetaCtx(ctx, nil)
if err != nil {
return nil, err
@@ -38,7 +38,7 @@ func Modify(ctx context.Context, in *pb.MarketSupplyItem) (reply *pb.StatusReply
return nil, err
}
return &pb.StatusReply{
return &pb.IdentityStatusReply{
Code: 0,
Message: "OK",
Identity: mktModel.Identity,