...
|
...
|
@@ -210,8 +210,8 @@ func (usersService *UsersService) CompanyUserResetPassword(companyUserResetPassw |
|
|
companyUserResetPasswordCommand.Operator.OrgId,
|
|
|
companyUserResetPasswordCommand.Operator.UserId)
|
|
|
var userIds []int64
|
|
|
for i := range companyUserResetPasswordCommand.UsersIds {
|
|
|
id, _ := strconv.Atoi(companyUserResetPasswordCommand.UsersIds[i])
|
|
|
for i := range companyUserResetPasswordCommand.UserIds {
|
|
|
id, _ := strconv.Atoi(companyUserResetPasswordCommand.UserIds[i])
|
|
|
userIds = append(userIds, int64(id))
|
|
|
}
|
|
|
_, err := creationUserGateway.UserBatchResetPassword(allied_creation_user.ReqBatchResetPasswordUser{
|
...
|
...
|
@@ -274,8 +274,9 @@ func (usersService *UsersService) CooperationUserAdd(cooperationUserAddCommand * |
|
|
cooperationUserAddCommand.Operator.OrgId,
|
|
|
cooperationUserAddCommand.Operator.UserId)
|
|
|
result, err := creationUserGateway.CooperatorUserCreate(allied_creation_user.ReqCreateCooperatorUser{
|
|
|
CompanyId: cooperationUserAddCommand.Operator.CompanyId,
|
|
|
CooperationCompany: cooperationUserAddCommand.CooperationCompany,
|
|
|
CooperationDeadline: time.Unix(cooperationUserAddCommand.CooperationDeadline, 0),
|
|
|
CooperationDeadline: time.Unix(cooperationUserAddCommand.CooperationDeadline/1000, 0),
|
|
|
Email: cooperationUserAddCommand.Email,
|
|
|
EnableStatus: cooperationUserAddCommand.EnableStatus,
|
|
|
UserCode: cooperationUserAddCommand.UsersCode,
|
...
|
...
|
@@ -360,6 +361,7 @@ func (usersService *UsersService) CooperationUserList(cooperationUserListQuery * |
|
|
CooperationCompany: cooperationUserListQuery.CooperationCompany,
|
|
|
DepName: "",
|
|
|
Phone: "",
|
|
|
UserType: 2,
|
|
|
})
|
|
|
var (
|
|
|
listData []dto.CooperationUserItem
|
...
|
...
|
@@ -370,7 +372,7 @@ func (usersService *UsersService) CooperationUserList(cooperationUserListQuery * |
|
|
item = dto.CooperationUserItem{
|
|
|
CooperationCompany: v.CooperationInfo.CooperationCompany,
|
|
|
UserId: strconv.Itoa(v.UserId),
|
|
|
CooperationDeadline: v.CooperationInfo.CooperationDeadline.Unix(),
|
|
|
CooperationDeadline: v.CooperationInfo.CooperationDeadline.Format("2006-01-02"),
|
|
|
Phone: v.UserInfo.Phone,
|
|
|
EnableStatus: v.EnableStatus,
|
|
|
UserCode: v.UserCode,
|
...
|
...
|
@@ -389,14 +391,20 @@ func (usersService *UsersService) CooperationUserResetPassword(cooperationUserRe |
|
|
cooperationUserResetPasswordCommand.Operator.CompanyId,
|
|
|
cooperationUserResetPasswordCommand.Operator.OrgId,
|
|
|
cooperationUserResetPasswordCommand.Operator.UserId)
|
|
|
var userIds []int64
|
|
|
for i := range cooperationUserResetPasswordCommand.UserIds {
|
|
|
id, _ := strconv.Atoi(cooperationUserResetPasswordCommand.UserIds[i])
|
|
|
userIds = append(userIds, int64(id))
|
|
|
}
|
|
|
_, err := creationUserGateway.UserBatchResetPassword(allied_creation_user.ReqBatchResetPasswordUser{
|
|
|
Password: "", //TODO 填充密码
|
|
|
UserIds: cooperationUserResetPasswordCommand.UsersIds,
|
|
|
Password: "123456", //TODO 填充密码
|
|
|
UserIds: userIds,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
}
|
|
|
return cooperationUserResetPasswordCommand, err
|
|
|
// TODO:返回消息提示 密码重置成功,初始密码为TL123456!
|
|
|
return "123456", err
|
|
|
}
|
|
|
|
|
|
// 编辑共创用户信息
|
...
|
...
|
@@ -406,13 +414,13 @@ func (usersService *UsersService) CooperationUserUpdate(cooperationUserUpdateCom |
|
|
cooperationUserUpdateCommand.Operator.OrgId,
|
|
|
cooperationUserUpdateCommand.Operator.UserId)
|
|
|
_, err := creationUserGateway.CooperatorUserUpdate(allied_creation_user.ReqUpdateCooperatorUser{
|
|
|
UserId: cooperationUserUpdateCommand.UsersId,
|
|
|
UserId: cooperationUserUpdateCommand.UserId,
|
|
|
CooperationCompany: cooperationUserUpdateCommand.CooperationCompany,
|
|
|
CooperationDeadline: time.Unix(cooperationUserUpdateCommand.CooperationDeadline, 0),
|
|
|
Email: cooperationUserUpdateCommand.Email,
|
|
|
EnableStatus: cooperationUserUpdateCommand.EnableStatus,
|
|
|
UserCode: cooperationUserUpdateCommand.UsersCode,
|
|
|
UserName: cooperationUserUpdateCommand.UsersName,
|
|
|
UserCode: cooperationUserUpdateCommand.UserCode,
|
|
|
UserName: cooperationUserUpdateCommand.UserName,
|
|
|
Avatar: cooperationUserUpdateCommand.Avatar,
|
|
|
OrgId: cooperationUserUpdateCommand.Operator.OrgId,
|
|
|
Phone: cooperationUserUpdateCommand.Phone,
|
...
|
...
|
|