作者 tangxuhui

Merge branch 'dev' into test

... ... @@ -610,15 +610,17 @@ func DeleteEmployeeData(data DeleteUserData) error {
deleteUserIds = append(deleteUserIds, userId)
}
}
_, err = o.QueryTable(&models.User{}).
Filter("id__in", deleteUserIds).
Update(orm.Params{
"delete_at": time.Now().Format("2006-01-02 15:04:05"),
})
if err != nil {
o.Rollback()
log.Error("更新user数据失败:%s", err)
return errors.New("删除user_company数据失败")
if len(deleteUserIds) > 0 {
_, err = o.QueryTable(&models.User{}).
Filter("id__in", deleteUserIds).
Update(orm.Params{
"delete_at": time.Now().Format("2006-01-02 15:04:05"),
})
if err != nil {
o.Rollback()
log.Error("更新user数据失败:%s", err)
return errors.New("删除user_company数据失败")
}
}
o.Commit()
return nil
... ...