作者 yangfu

密码初始化修改

... ... @@ -106,7 +106,7 @@ func (usersService *UsersService) CompanyUserAdd(companyUserAddCommand *command.
orgId, _ := strconv.Atoi(companyUserAddCommand.OrgId)
userOrg := []int64{}
userRole := []int64{}
initPassword, _, err := usersService.GetInitPassword()
initPassword, _, err := usersService.GetInitPassword(companyUserAddCommand.Operator)
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
}
... ... @@ -221,7 +221,7 @@ func (usersService *UsersService) CompanyUserResetPassword(companyUserResetPassw
id, _ := strconv.Atoi(companyUserResetPasswordCommand.UserIds[i])
userIds = append(userIds, int64(id))
}
initPassword, primitivePassword, err := usersService.GetInitPassword()
initPassword, primitivePassword, err := usersService.GetInitPassword(companyUserResetPasswordCommand.Operator)
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
}
... ... @@ -280,7 +280,7 @@ func (usersService *UsersService) CompanyUserUpdate(companyUserUpdateCommand *co
func (usersService *UsersService) CooperationUserAdd(cooperationUserAddCommand *command.CooperationUserAddCommand) (interface{}, error) {
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
cooperationUserAddCommand.Operator)
initPassword, _, err := usersService.GetInitPassword()
initPassword, _, err := usersService.GetInitPassword(cooperationUserAddCommand.Operator)
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
}
... ... @@ -396,7 +396,7 @@ func (usersService *UsersService) CooperationUserList(cooperationUserListQuery *
func (usersService *UsersService) CooperationUserResetPassword(cooperationUserResetPasswordCommand *command.CooperationUserResetPasswordCommand) (interface{}, error) {
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
cooperationUserResetPasswordCommand.Operator)
initPassword, primitivePassword, err := usersService.GetInitPassword()
initPassword, primitivePassword, err := usersService.GetInitPassword(cooperationUserResetPasswordCommand.Operator)
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
}
... ... @@ -530,9 +530,9 @@ func (usersService *UsersService) SelectorCompanyOrgAll(selectorQuery *query.Com
}
//GetInitPassword 获取公司初始化密码
func (usersService *UsersService) GetInitPassword() (string, string, error) {
func (usersService *UsersService) GetInitPassword(operator domain.Operator) (string, string, error) {
var password string
alliedCreationBasic := allied_creation_basic.NewHttplibAlliedCreationBasic(domain.Operator{})
alliedCreationBasic := allied_creation_basic.NewHttplibAlliedCreationBasic(operator)
reqResult, err := alliedCreationBasic.SystemSettingGet(allied_creation_basic.ReqSystemSettingGet{
domain.InitPasswordSettingKey,
})
... ...