作者 yangfu

用户基础数据修改

... ... @@ -117,8 +117,8 @@ func (srv UserService) UpdateUserBaseInfo(updateUserInfoCommand *command.UpdateU
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(domain.Operator{})
user, err := creationUserGateway.UserGet(allied_creation_user.ReqGetUser{
UserId: int(updateUserInfoCommand.Operator.UserId),
user, err := creationUserGateway.AuthUserBaseInfo(allied_creation_user.ReqAuthUserBase{
Account: updateUserInfoCommand.Operator.Phone,
})
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, "用户不存在")
... ... @@ -143,11 +143,11 @@ func (srv UserService) UpdateUserBaseInfo(updateUserInfoCommand *command.UpdateU
}
}
_, err = creationUserGateway.UserUpdateBaseInfo(allied_creation_user.ReqUserUpdateBaseInfo{
UserId: int64(user.UserId),
UserName: updateUserInfoCommand.UserName,
Avatar: updateUserInfoCommand.Avatar,
Phone: updateUserInfoCommand.Phone,
Email: updateUserInfoCommand.Email,
UserBaseId: int64(user.UserBaseID),
UserName: updateUserInfoCommand.UserName,
Avatar: updateUserInfoCommand.Avatar,
Phone: updateUserInfoCommand.Phone,
Email: updateUserInfoCommand.Email,
})
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
... ...
... ... @@ -303,6 +303,8 @@ type (
type (
ReqUserUpdateBaseInfo struct {
UserId int64 `json:"userId"`
// 用户基础Id 用户唯一标识
UserBaseId int64 `cname:"用户Id 用户唯一标识" json:"userBaseId" valid:"Required"`
// 用户姓名
UserName string `cname:"用户姓名" json:"userName" valid:"Required"`
// 头像
... ...