作者 tangxvhui

调整参数

package command
type AuthorizeCommand struct {
Credentials string `json:"credentials" valid:"Required;"` //登录凭证
Cuid int `json:"cuid" valid:"Required;"` //统一用户中心用户 UID
Cid int `json:"cid" valid:"Required;"` //统一用户中心公司 ID
Muid int `json:"muid" valid:"Required;"` //企业平台中的用户 UID
}
... ...
... ... @@ -231,7 +231,7 @@ func (service *AuthService) MeInfo(param *command.GetMeInfo) (map[string]interfa
}
// Authorize 移动端授权登录
func (srv *AuthService) Authorize(param *command.MobileLoginCommand) (map[string]interface{}, error) {
func (srv *AuthService) Authorize(param *command.AuthorizeCommand) (map[string]interface{}, error) {
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ...
... ... @@ -44,7 +44,7 @@ func (controller *AuthController) MobileLogin() {
// Login 手机端登录 获取authCode
func (controller *AuthController) Authorize() {
authService := &service.AuthService{}
loginCommand := &command.MobileLoginCommand{}
loginCommand := &command.AuthorizeCommand{}
_ = controller.Unmarshal(loginCommand)
resp, err := authService.Authorize(loginCommand)
controller.Response(resp, err)
... ...