实现商户注册、管理员审核商户申请接口

This commit is contained in:
2025-06-04 15:10:56 +08:00
parent 00b889cfcc
commit caf3d42fe5
63 changed files with 1195 additions and 294 deletions

View 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
}