作者 yangfu

密码初始化修改

@@ -106,7 +106,7 @@ func (usersService *UsersService) CompanyUserAdd(companyUserAddCommand *command. @@ -106,7 +106,7 @@ func (usersService *UsersService) CompanyUserAdd(companyUserAddCommand *command.
106 orgId, _ := strconv.Atoi(companyUserAddCommand.OrgId) 106 orgId, _ := strconv.Atoi(companyUserAddCommand.OrgId)
107 userOrg := []int64{} 107 userOrg := []int64{}
108 userRole := []int64{} 108 userRole := []int64{}
109 - initPassword, _, err := usersService.GetInitPassword() 109 + initPassword, _, err := usersService.GetInitPassword(companyUserAddCommand.Operator)
110 if err != nil { 110 if err != nil {
111 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 111 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
112 } 112 }
@@ -221,7 +221,7 @@ func (usersService *UsersService) CompanyUserResetPassword(companyUserResetPassw @@ -221,7 +221,7 @@ func (usersService *UsersService) CompanyUserResetPassword(companyUserResetPassw
221 id, _ := strconv.Atoi(companyUserResetPasswordCommand.UserIds[i]) 221 id, _ := strconv.Atoi(companyUserResetPasswordCommand.UserIds[i])
222 userIds = append(userIds, int64(id)) 222 userIds = append(userIds, int64(id))
223 } 223 }
224 - initPassword, primitivePassword, err := usersService.GetInitPassword() 224 + initPassword, primitivePassword, err := usersService.GetInitPassword(companyUserResetPasswordCommand.Operator)
225 if err != nil { 225 if err != nil {
226 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 226 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
227 } 227 }
@@ -280,7 +280,7 @@ func (usersService *UsersService) CompanyUserUpdate(companyUserUpdateCommand *co @@ -280,7 +280,7 @@ func (usersService *UsersService) CompanyUserUpdate(companyUserUpdateCommand *co
280 func (usersService *UsersService) CooperationUserAdd(cooperationUserAddCommand *command.CooperationUserAddCommand) (interface{}, error) { 280 func (usersService *UsersService) CooperationUserAdd(cooperationUserAddCommand *command.CooperationUserAddCommand) (interface{}, error) {
281 creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( 281 creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
282 cooperationUserAddCommand.Operator) 282 cooperationUserAddCommand.Operator)
283 - initPassword, _, err := usersService.GetInitPassword() 283 + initPassword, _, err := usersService.GetInitPassword(cooperationUserAddCommand.Operator)
284 if err != nil { 284 if err != nil {
285 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 285 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
286 } 286 }
@@ -396,7 +396,7 @@ func (usersService *UsersService) CooperationUserList(cooperationUserListQuery * @@ -396,7 +396,7 @@ func (usersService *UsersService) CooperationUserList(cooperationUserListQuery *
396 func (usersService *UsersService) CooperationUserResetPassword(cooperationUserResetPasswordCommand *command.CooperationUserResetPasswordCommand) (interface{}, error) { 396 func (usersService *UsersService) CooperationUserResetPassword(cooperationUserResetPasswordCommand *command.CooperationUserResetPasswordCommand) (interface{}, error) {
397 creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( 397 creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
398 cooperationUserResetPasswordCommand.Operator) 398 cooperationUserResetPasswordCommand.Operator)
399 - initPassword, primitivePassword, err := usersService.GetInitPassword() 399 + initPassword, primitivePassword, err := usersService.GetInitPassword(cooperationUserResetPasswordCommand.Operator)
400 if err != nil { 400 if err != nil {
401 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 401 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
402 } 402 }
@@ -530,9 +530,9 @@ func (usersService *UsersService) SelectorCompanyOrgAll(selectorQuery *query.Com @@ -530,9 +530,9 @@ func (usersService *UsersService) SelectorCompanyOrgAll(selectorQuery *query.Com
530 } 530 }
531 531
532 //GetInitPassword 获取公司初始化密码 532 //GetInitPassword 获取公司初始化密码
533 -func (usersService *UsersService) GetInitPassword() (string, string, error) { 533 +func (usersService *UsersService) GetInitPassword(operator domain.Operator) (string, string, error) {
534 var password string 534 var password string
535 - alliedCreationBasic := allied_creation_basic.NewHttplibAlliedCreationBasic(domain.Operator{}) 535 + alliedCreationBasic := allied_creation_basic.NewHttplibAlliedCreationBasic(operator)
536 reqResult, err := alliedCreationBasic.SystemSettingGet(allied_creation_basic.ReqSystemSettingGet{ 536 reqResult, err := alliedCreationBasic.SystemSettingGet(allied_creation_basic.ReqSystemSettingGet{
537 domain.InitPasswordSettingKey, 537 domain.InitPasswordSettingKey,
538 }) 538 })