实现商户注册、管理员审核商户申请接口
This commit is contained in:
@ -5,4 +5,32 @@
|
||||
|
||||
package service
|
||||
|
||||
type ()
|
||||
import (
|
||||
"context"
|
||||
"server/internal/model"
|
||||
)
|
||||
|
||||
type (
|
||||
IMerchantAdmin interface {
|
||||
Login(ctx context.Context, in *model.MerchantLoginIn) (out *model.MerchantLoginOut, err error)
|
||||
Info(ctx context.Context, in *model.MerchantAdminInfoIn) (out *model.MerchantAdminInfoOut, err error)
|
||||
Code(ctx context.Context, in *model.MerchantAdminCodeIn) (out *model.MerchantAdminCodeOut, err error)
|
||||
VertifyPhone(ctx context.Context, in *model.MerchantAdminVertifyPhoneIn) (out *model.MerchantAdminVertifyPhoneOut, err error)
|
||||
Register(ctx context.Context, in *model.MerchantAdminRegisterIn) (out *model.MerchantAdminRegisterOut, err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localMerchantAdmin IMerchantAdmin
|
||||
)
|
||||
|
||||
func MerchantAdmin() IMerchantAdmin {
|
||||
if localMerchantAdmin == nil {
|
||||
panic("implement not found for interface IMerchantAdmin, forgot register?")
|
||||
}
|
||||
return localMerchantAdmin
|
||||
}
|
||||
|
||||
func RegisterMerchantAdmin(i IMerchantAdmin) {
|
||||
localMerchantAdmin = i
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user