|
@@ -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
|
}
|
|
@@ -185,6 +185,7 @@ func (usersService *UsersService) CompanyUserList(companyUserListQuery *query.Co |
|
@@ -185,6 +185,7 @@ func (usersService *UsersService) CompanyUserList(companyUserListQuery *query.Co |
185
|
UserName: companyUserListQuery.UserName,
|
185
|
UserName: companyUserListQuery.UserName,
|
186
|
DepName: companyUserListQuery.DepartmentName,
|
186
|
DepName: companyUserListQuery.DepartmentName,
|
187
|
Phone: "",
|
187
|
Phone: "",
|
|
|
188
|
+ UserType: domain.UserTypeEmployee,
|
188
|
})
|
189
|
})
|
189
|
|
190
|
|
190
|
if err != nil {
|
191
|
if err != nil {
|
|
@@ -221,7 +222,7 @@ func (usersService *UsersService) CompanyUserResetPassword(companyUserResetPassw |
|
@@ -221,7 +222,7 @@ func (usersService *UsersService) CompanyUserResetPassword(companyUserResetPassw |
221
|
id, _ := strconv.Atoi(companyUserResetPasswordCommand.UserIds[i])
|
222
|
id, _ := strconv.Atoi(companyUserResetPasswordCommand.UserIds[i])
|
222
|
userIds = append(userIds, int64(id))
|
223
|
userIds = append(userIds, int64(id))
|
223
|
}
|
224
|
}
|
224
|
- initPassword, primitivePassword, err := usersService.GetInitPassword()
|
225
|
+ initPassword, primitivePassword, err := usersService.GetInitPassword(companyUserResetPasswordCommand.Operator)
|
225
|
if err != nil {
|
226
|
if err != nil {
|
226
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
227
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
227
|
}
|
228
|
}
|
|
@@ -280,7 +281,7 @@ func (usersService *UsersService) CompanyUserUpdate(companyUserUpdateCommand *co |
|
@@ -280,7 +281,7 @@ func (usersService *UsersService) CompanyUserUpdate(companyUserUpdateCommand *co |
280
|
func (usersService *UsersService) CooperationUserAdd(cooperationUserAddCommand *command.CooperationUserAddCommand) (interface{}, error) {
|
281
|
func (usersService *UsersService) CooperationUserAdd(cooperationUserAddCommand *command.CooperationUserAddCommand) (interface{}, error) {
|
281
|
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
|
282
|
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
|
282
|
cooperationUserAddCommand.Operator)
|
283
|
cooperationUserAddCommand.Operator)
|
283
|
- initPassword, _, err := usersService.GetInitPassword()
|
284
|
+ initPassword, _, err := usersService.GetInitPassword(cooperationUserAddCommand.Operator)
|
284
|
if err != nil {
|
285
|
if err != nil {
|
285
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
286
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
286
|
}
|
287
|
}
|
|
@@ -368,7 +369,7 @@ func (usersService *UsersService) CooperationUserList(cooperationUserListQuery * |
|
@@ -368,7 +369,7 @@ func (usersService *UsersService) CooperationUserList(cooperationUserListQuery * |
368
|
CooperationCompany: cooperationUserListQuery.CooperationCompany,
|
369
|
CooperationCompany: cooperationUserListQuery.CooperationCompany,
|
369
|
DepName: "",
|
370
|
DepName: "",
|
370
|
Phone: "",
|
371
|
Phone: "",
|
371
|
- UserType: 2,
|
372
|
+ UserType: domain.UserTypeCooperation,
|
372
|
})
|
373
|
})
|
373
|
var (
|
374
|
var (
|
374
|
listData []dto.CooperationUserItem
|
375
|
listData []dto.CooperationUserItem
|
|
@@ -396,7 +397,7 @@ func (usersService *UsersService) CooperationUserList(cooperationUserListQuery * |
|
@@ -396,7 +397,7 @@ func (usersService *UsersService) CooperationUserList(cooperationUserListQuery * |
396
|
func (usersService *UsersService) CooperationUserResetPassword(cooperationUserResetPasswordCommand *command.CooperationUserResetPasswordCommand) (interface{}, error) {
|
397
|
func (usersService *UsersService) CooperationUserResetPassword(cooperationUserResetPasswordCommand *command.CooperationUserResetPasswordCommand) (interface{}, error) {
|
397
|
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
|
398
|
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
|
398
|
cooperationUserResetPasswordCommand.Operator)
|
399
|
cooperationUserResetPasswordCommand.Operator)
|
399
|
- initPassword, primitivePassword, err := usersService.GetInitPassword()
|
400
|
+ initPassword, primitivePassword, err := usersService.GetInitPassword(cooperationUserResetPasswordCommand.Operator)
|
400
|
if err != nil {
|
401
|
if err != nil {
|
401
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
402
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
402
|
}
|
403
|
}
|
|
@@ -530,9 +531,9 @@ func (usersService *UsersService) SelectorCompanyOrgAll(selectorQuery *query.Com |
|
@@ -530,9 +531,9 @@ func (usersService *UsersService) SelectorCompanyOrgAll(selectorQuery *query.Com |
530
|
}
|
531
|
}
|
531
|
|
532
|
|
532
|
//GetInitPassword 获取公司初始化密码
|
533
|
//GetInitPassword 获取公司初始化密码
|
533
|
-func (usersService *UsersService) GetInitPassword() (string, string, error) {
|
534
|
+func (usersService *UsersService) GetInitPassword(operator domain.Operator) (string, string, error) {
|
534
|
var password string
|
535
|
var password string
|
535
|
- alliedCreationBasic := allied_creation_basic.NewHttplibAlliedCreationBasic(domain.Operator{})
|
536
|
+ alliedCreationBasic := allied_creation_basic.NewHttplibAlliedCreationBasic(operator)
|
536
|
reqResult, err := alliedCreationBasic.SystemSettingGet(allied_creation_basic.ReqSystemSettingGet{
|
537
|
reqResult, err := alliedCreationBasic.SystemSettingGet(allied_creation_basic.ReqSystemSettingGet{
|
537
|
domain.InitPasswordSettingKey,
|
538
|
domain.InitPasswordSettingKey,
|
538
|
})
|
539
|
})
|