正在显示
3 个修改的文件
包含
10 行增加
和
2 行删除
pkg/application/auth/command/authorize.go
0 → 100644
1 | +package command | ||
2 | + | ||
3 | +type AuthorizeCommand struct { | ||
4 | + Credentials string `json:"credentials" valid:"Required;"` //登录凭证 | ||
5 | + Cuid int `json:"cuid" valid:"Required;"` //统一用户中心用户 UID | ||
6 | + Cid int `json:"cid" valid:"Required;"` //统一用户中心公司 ID | ||
7 | + Muid int `json:"muid" valid:"Required;"` //企业平台中的用户 UID | ||
8 | +} |
@@ -231,7 +231,7 @@ func (service *AuthService) MeInfo(param *command.GetMeInfo) (map[string]interfa | @@ -231,7 +231,7 @@ func (service *AuthService) MeInfo(param *command.GetMeInfo) (map[string]interfa | ||
231 | } | 231 | } |
232 | 232 | ||
233 | // Authorize 移动端授权登录 | 233 | // Authorize 移动端授权登录 |
234 | -func (srv *AuthService) Authorize(param *command.MobileLoginCommand) (map[string]interface{}, error) { | 234 | +func (srv *AuthService) Authorize(param *command.AuthorizeCommand) (map[string]interface{}, error) { |
235 | transactionContext, err := factory.CreateTransactionContext(nil) | 235 | transactionContext, err := factory.CreateTransactionContext(nil) |
236 | if err != nil { | 236 | if err != nil { |
237 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 237 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
@@ -44,7 +44,7 @@ func (controller *AuthController) MobileLogin() { | @@ -44,7 +44,7 @@ func (controller *AuthController) MobileLogin() { | ||
44 | // Login 手机端登录 获取authCode | 44 | // Login 手机端登录 获取authCode |
45 | func (controller *AuthController) Authorize() { | 45 | func (controller *AuthController) Authorize() { |
46 | authService := &service.AuthService{} | 46 | authService := &service.AuthService{} |
47 | - loginCommand := &command.MobileLoginCommand{} | 47 | + loginCommand := &command.AuthorizeCommand{} |
48 | _ = controller.Unmarshal(loginCommand) | 48 | _ = controller.Unmarshal(loginCommand) |
49 | resp, err := authService.Authorize(loginCommand) | 49 | resp, err := authService.Authorize(loginCommand) |
50 | controller.Response(resp, err) | 50 | controller.Response(resp, err) |
-
请 注册 或 登录 后发表评论