作者 tangxuhui
... ... @@ -468,7 +468,7 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
}
var user = map[string]interface{}{
"userId": 0,
"userId": resultUser.UserBaseID,
//"userOpenId": fmt.Sprintf("%v",resultUser.UserBaseID),
"userInfo": map[string]interface{}{
"userName": resultUser.UserInfo.UserName,
... ... @@ -497,8 +497,9 @@ func (svr AuthService) getUserInfo(operator domain.Operator) (interface{}, error
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
}
var user = map[string]interface{}{
"userId": resultUser.UserId,
//"userOpenId": fmt.Sprintf("%v",resultUser.UserBaseId),
"userId": resultUser.UserBaseId,
//"publicUserId":fmt.Sprintf("%v",resultUser.UserBaseId),
"userCode": resultUser.UserCode,
"userInfo": map[string]interface{}{
"userName": resultUser.UserInfo.UserName,
"userPhone": resultUser.UserInfo.Phone,
... ... @@ -643,7 +644,7 @@ loopUser1:
}
// 个人登录
if len(userSearchResult.Users) == 0 {
if !currentOrgIsOK { //|| len(userSearchResult.Users) == 0
userBase, err := creationUserGateway.AuthUserBaseInfo(allied_creation_user.ReqAuthUserBase{
Account: loginToken.Account,
})
... ...
... ... @@ -162,7 +162,8 @@ func (srv UserService) UpdateUserBaseInfo(updateUserInfoCommand *command.UpdateU
func (srv UserService) DestroyAccount(destroyAccountCommand *command.DestroyAccountCommand) (interface{}, error) {
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(domain.Operator{})
result, err := creationUserGateway.AuthDestroyAccount(allied_creation_user.ReqAuthDestroyAccount{
UserId: destroyAccountCommand.Operator.UserId,
//UserId: destroyAccountCommand.Operator.UserId,
Account: destroyAccountCommand.Operator.Phone,
})
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
... ...
... ... @@ -43,7 +43,9 @@ type (
type (
ReqAuthDestroyAccount struct {
// 用户Id 用户唯一标识
UserId int64 `cname:"用户Id 用户唯一标识" json:"userId" valid:"Required"`
//UserId int64 `cname:"用户Id 用户唯一标识" json:"userId" valid:"Required"`
// 用户Id 用户唯一标识
Account string `cname:"账号" json:"account"`
}
DataAuthDestroyAccount struct {
... ...