作者 yangfu

输出userId

@@ -468,7 +468,7 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error @@ -468,7 +468,7 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error
468 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 468 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
469 } 469 }
470 var user = map[string]interface{}{ 470 var user = map[string]interface{}{
471 - "userId": 0, 471 + "userId": resultUser.UserBaseID,
472 //"userOpenId": fmt.Sprintf("%v",resultUser.UserBaseID), 472 //"userOpenId": fmt.Sprintf("%v",resultUser.UserBaseID),
473 "userInfo": map[string]interface{}{ 473 "userInfo": map[string]interface{}{
474 "userName": resultUser.UserInfo.UserName, 474 "userName": resultUser.UserInfo.UserName,
@@ -497,8 +497,9 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error @@ -497,8 +497,9 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error
497 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 497 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
498 } 498 }
499 var user = map[string]interface{}{ 499 var user = map[string]interface{}{
500 - "userId": resultUser.UserId,  
501 - //"userOpenId": fmt.Sprintf("%v",resultUser.UserBaseId), 500 + "userId": resultUser.UserBaseId,
  501 + //"publicUserId":fmt.Sprintf("%v",resultUser.UserBaseId),
  502 + "userCode": resultUser.UserCode,
502 "userInfo": map[string]interface{}{ 503 "userInfo": map[string]interface{}{
503 "userName": resultUser.UserInfo.UserName, 504 "userName": resultUser.UserInfo.UserName,
504 "userPhone": resultUser.UserInfo.Phone, 505 "userPhone": resultUser.UserInfo.Phone,
@@ -643,7 +644,7 @@ loopUser1: @@ -643,7 +644,7 @@ loopUser1:
643 } 644 }
644 645
645 // 个人登录 646 // 个人登录
646 - if len(userSearchResult.Users) == 0 { 647 + if !currentOrgIsOK { //|| len(userSearchResult.Users) == 0
647 userBase, err := creationUserGateway.AuthUserBaseInfo(allied_creation_user.ReqAuthUserBase{ 648 userBase, err := creationUserGateway.AuthUserBaseInfo(allied_creation_user.ReqAuthUserBase{
648 Account: loginToken.Account, 649 Account: loginToken.Account,
649 }) 650 })
@@ -162,7 +162,8 @@ func (srv UserService) UpdateUserBaseInfo(updateUserInfoCommand *command.UpdateU @@ -162,7 +162,8 @@ func (srv UserService) UpdateUserBaseInfo(updateUserInfoCommand *command.UpdateU
162 func (srv UserService) DestroyAccount(destroyAccountCommand *command.DestroyAccountCommand) (interface{}, error) { 162 func (srv UserService) DestroyAccount(destroyAccountCommand *command.DestroyAccountCommand) (interface{}, error) {
163 creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(domain.Operator{}) 163 creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(domain.Operator{})
164 result, err := creationUserGateway.AuthDestroyAccount(allied_creation_user.ReqAuthDestroyAccount{ 164 result, err := creationUserGateway.AuthDestroyAccount(allied_creation_user.ReqAuthDestroyAccount{
165 - UserId: destroyAccountCommand.Operator.UserId, 165 + //UserId: destroyAccountCommand.Operator.UserId,
  166 + Account: destroyAccountCommand.Operator.Phone,
166 }) 167 })
167 if err != nil { 168 if err != nil {
168 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 169 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
@@ -43,7 +43,9 @@ type ( @@ -43,7 +43,9 @@ type (
43 type ( 43 type (
44 ReqAuthDestroyAccount struct { 44 ReqAuthDestroyAccount struct {
45 // 用户Id 用户唯一标识 45 // 用户Id 用户唯一标识
46 - UserId int64 `cname:"用户Id 用户唯一标识" json:"userId" valid:"Required"` 46 + //UserId int64 `cname:"用户Id 用户唯一标识" json:"userId" valid:"Required"`
  47 + // 用户Id 用户唯一标识
  48 + Account string `cname:"账号" json:"account"`
47 } 49 }
48 50
49 DataAuthDestroyAccount struct { 51 DataAuthDestroyAccount struct {