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

@@ -13,7 +13,7 @@ import (
)
// 添加分类
func Create(ctx context.Context, in *pb.CategoryItem) (reply *pb.StatusReply, err error) {
func Create(ctx context.Context, in *pb.CategoryItem) (reply *pb.IdentityStatusReply, err error) {
// parse authorization meta.
AUTH, err := service.ParseMetaCtx(ctx, &service.ParseOptions{RoleValue: "Mall_Admin"})
if err != nil {
@@ -38,7 +38,7 @@ func Create(ctx context.Context, in *pb.CategoryItem) (reply *pb.StatusReply, er
return nil, errcode.ErrDB
}
return &pb.StatusReply{
return &pb.IdentityStatusReply{
Code: 0,
Message: "OK",
Identity: data.Identity,

View File

@@ -13,7 +13,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, &service.ParseOptions{RoleValue: "Mall_Admin"})
if err != nil {
@@ -31,7 +31,7 @@ func Delete(ctx context.Context, in *pb.IdentRequest) (reply *pb.StatusReply, er
return nil, errcode.ErrDB
}
return &pb.StatusReply{
return &pb.IdentityStatusReply{
Code: 0,
Message: "OK",
Timeseq: time.Now().UnixMilli(),

View File

@@ -12,7 +12,7 @@ import (
)
// 修改分类
func Modify(ctx context.Context, in *pb.CategoryItem) (reply *pb.StatusReply, err error) {
func Modify(ctx context.Context, in *pb.CategoryItem) (reply *pb.IdentityStatusReply, err error) {
_, err = service.ParseMetaCtx(ctx, &service.ParseOptions{RoleValue: "Mall_Admin"})
if err != nil {
return nil, err
@@ -33,7 +33,7 @@ func Modify(ctx context.Context, in *pb.CategoryItem) (reply *pb.StatusReply, er
return nil, errcode.ErrDB
}
return &pb.StatusReply{
return &pb.IdentityStatusReply{
Identity: in.Identity,
Code: 0,
Message: "OK",