作者 tangxuhui
... ... @@ -350,7 +350,7 @@ func (usersService *UsersService) CooperationUserGet(cooperationUserGetQuery *qu
}
var deadline int64
if !result.CooperationInfo.CooperationDeadline.IsZero() {
deadline = result.CooperationInfo.CooperationDeadline.UnixNano() / 1e6
deadline = result.CooperationInfo.CooperationDeadline.Unix()
}
userInfo := dto.CooperationUserInfo{
UserId: strconv.Itoa(result.UserId),
... ... @@ -399,7 +399,7 @@ func (usersService *UsersService) CooperationUserList(cooperationUserListQuery *
OrgName: v.Org.OrgName,
OrgId: strconv.Itoa(v.Org.OrgId),
}
if !v.CooperationInfo.CooperationDeadline.IsZero() {
if !v.CooperationInfo.CooperationDeadline.IsZero() && v.CooperationInfo.CooperationDeadline.After(time.Unix(1136044800, 0)) {
item.CooperationDeadline = v.CooperationInfo.CooperationDeadline.Format("2006-01-02")
}
... ... @@ -435,15 +435,10 @@ func (usersService *UsersService) CooperationUserResetPassword(cooperationUserRe
func (usersService *UsersService) CooperationUserUpdate(cooperationUserUpdateCommand *command.CooperationUserUpdateCommand) (interface{}, error) {
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
cooperationUserUpdateCommand.Operator)
var cooperationDeadline time.Time
if cooperationUserUpdateCommand.CooperationDeadline > 0 {
cooperationDeadline = time.Unix(cooperationUserUpdateCommand.CooperationDeadline, 0)
}
_, err := creationUserGateway.CooperatorUserUpdate(allied_creation_user.ReqUpdateCooperatorUser{
UserId: cooperationUserUpdateCommand.UserId,
CooperationCompany: cooperationUserUpdateCommand.CooperationCompany,
CooperationDeadline: cooperationDeadline,
CooperationDeadline: time.Unix(cooperationUserUpdateCommand.CooperationDeadline/1000, 0),
Email: cooperationUserUpdateCommand.Email,
EnableStatus: cooperationUserUpdateCommand.EnableStatus,
UserCode: cooperationUserUpdateCommand.UserCode,
... ... @@ -555,7 +550,7 @@ func (usersService *UsersService) GetInitPassword(operator domain.Operator) (str
var password string
alliedCreationBasic := allied_creation_basic.NewHttplibAlliedCreationBasic(operator)
reqResult, err := alliedCreationBasic.SystemSettingGet(allied_creation_basic.ReqSystemSettingGet{
SettingCode: domain.InitPasswordSettingKey,
domain.InitPasswordSettingKey,
})
if err != nil {
log.Logger.Error(err.Error())
... ...