refactor: localize protobuf definitions
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
// 申请加入店铺
|
||||
func ApplyJoin(ctx context.Context, in *pb.ApplyJoinRequest) (reply *pb.StatusReply, err error) {
|
||||
func ApplyJoin(ctx context.Context, in *pb.ApplyJoinRequest) (reply *pb.IdentityStatusReply, err error) {
|
||||
// parse authorization meta.
|
||||
_, err = service.ParseMetaCtx(ctx, &service.ParseOptions{RoleValue: "Mall_Admin"})
|
||||
if err != nil {
|
||||
@@ -20,7 +20,7 @@ func ApplyJoin(ctx context.Context, in *pb.ApplyJoinRequest) (reply *pb.StatusRe
|
||||
|
||||
// TODO: add your logic code & delete this line.
|
||||
|
||||
return &pb.StatusReply{
|
||||
return &pb.IdentityStatusReply{
|
||||
Code: 0,
|
||||
Message: "OK",
|
||||
Timeseq: time.Now().UnixMilli(),
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
// 店铺许可授权
|
||||
func Licensing(ctx context.Context, in *pb.LicensingRequest) (reply *pb.StatusReply, err error) {
|
||||
func Licensing(ctx context.Context, in *pb.LicensingRequest) (reply *pb.IdentityStatusReply, err error) {
|
||||
var identity string
|
||||
licenseType := strings.ToUpper(in.GetLicenseType())
|
||||
|
||||
@@ -29,7 +29,7 @@ func Licensing(ctx context.Context, in *pb.LicensingRequest) (reply *pb.StatusRe
|
||||
|
||||
// TODO: add your logic code & delete this line.
|
||||
|
||||
return &pb.StatusReply{
|
||||
return &pb.IdentityStatusReply{
|
||||
Code: 0,
|
||||
Message: "OK",
|
||||
Identity: identity,
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
// 设置邮件服务器配置
|
||||
func SetEmail(ctx context.Context, in *pb.SettingRequest) (reply *pb.StatusReply, err error) {
|
||||
func SetEmail(ctx context.Context, in *pb.SettingRequest) (reply *pb.IdentityStatusReply, err error) {
|
||||
_, err = service.ParseMetaCtx(ctx, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -28,7 +28,7 @@ func SetEmail(ctx context.Context, in *pb.SettingRequest) (reply *pb.StatusReply
|
||||
return nil, errcode.ErrDB
|
||||
}
|
||||
|
||||
return &pb.StatusReply{
|
||||
return &pb.IdentityStatusReply{
|
||||
Code: 0,
|
||||
Message: "OK",
|
||||
Timeseq: time.Now().UnixMilli(),
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
// 设置支付方式配置
|
||||
func SetPayment(ctx context.Context, in *pb.SettingRequest) (reply *pb.StatusReply, err error) {
|
||||
func SetPayment(ctx context.Context, in *pb.SettingRequest) (reply *pb.IdentityStatusReply, err error) {
|
||||
_, err = service.ParseMetaCtx(ctx, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -28,7 +28,7 @@ func SetPayment(ctx context.Context, in *pb.SettingRequest) (reply *pb.StatusRep
|
||||
return nil, errcode.ErrDB
|
||||
}
|
||||
|
||||
return &pb.StatusReply{
|
||||
return &pb.IdentityStatusReply{
|
||||
Code: 0,
|
||||
Message: "OK",
|
||||
Timeseq: time.Now().UnixMilli(),
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
// 设置店铺基础配置
|
||||
func SetSetting(ctx context.Context, in *pb.StoreBasic) (reply *pb.StatusReply, err error) {
|
||||
func SetSetting(ctx context.Context, in *pb.StoreBasic) (reply *pb.IdentityStatusReply, err error) {
|
||||
// parse authorization meta.
|
||||
_, err = service.ParseMetaCtx(ctx, &service.ParseOptions{RoleValue: "Mall_Admin"})
|
||||
if err != nil {
|
||||
@@ -37,7 +37,7 @@ func SetSetting(ctx context.Context, in *pb.StoreBasic) (reply *pb.StatusReply,
|
||||
}
|
||||
|
||||
// TODO: add your logic code & delete this line.
|
||||
return &pb.StatusReply{
|
||||
return &pb.IdentityStatusReply{
|
||||
Code: 0,
|
||||
Message: "OK",
|
||||
Timeseq: time.Now().UnixMilli(),
|
||||
|
||||
Reference in New Issue
Block a user