实现商户注册、管理员审核商户申请接口
This commit is contained in:
20
internal/controller/auth/auth_v1_merchant_register.go
Normal file
20
internal/controller/auth/auth_v1_merchant_register.go
Normal file
@ -0,0 +1,20 @@
|
||||
package auth
|
||||
|
||||
import (
|
||||
"context"
|
||||
"server/internal/model"
|
||||
"server/internal/service"
|
||||
|
||||
"server/api/auth/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) MerchantRegister(ctx context.Context, req *v1.MerchantRegisterReq) (res *v1.MerchantRegisterRes, err error) {
|
||||
out, err := service.MerchantAdmin().Register(ctx, &model.MerchantAdminRegisterIn{Username: req.Username, Password: req.Password, Phone: req.Phone, ApplicationReason: req.ApplicationReason, Code: req.Code})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &v1.MerchantRegisterRes{
|
||||
Msg: "申请成功, 等待系统管理员审核申请",
|
||||
Success: out.Success,
|
||||
}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user