Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

通过excel导入用户组织支持全量更新 #728

Closed
Zoeyzhou11 opened this issue Oct 17, 2022 · 11 comments
Closed

通过excel导入用户组织支持全量更新 #728

Zoeyzhou11 opened this issue Oct 17, 2022 · 11 comments
Assignees
Labels
Layer: api Api module related Priority: Middlum Middlum priority todo 进入开发排期的状态,纳入了最近的迭代 Type: enhancement Enhancement for existing feature
Milestone

Comments

@Zoeyzhou11
Copy link

image

@wklken
Copy link
Collaborator

wklken commented Oct 17, 2022

导入组织:

  1. 查询用户的旧有组织关系, 删除(清理动作)
  2. 根据新的组织, 执行原先的逻辑(创建或更新)

@Shutulee Shutulee added this to the Y2022M45 milestone Nov 7, 2022
@Shutulee Shutulee self-assigned this Nov 10, 2022
@Shutulee
Copy link
Collaborator

Shutulee commented Nov 11, 2022

初版草案

风险分析

image

方案说明

image
image

@wklken
Copy link
Collaborator

wklken commented Nov 14, 2022

交互变更, 不影响后台需要变更的逻辑

@Xmandon Xmandon removed this from the Y2022M45 milestone Nov 14, 2022
@wklken wklken added Type: enhancement Enhancement for existing feature Priority: Middlum Middlum priority Layer: api Api module related todo 进入开发排期的状态,纳入了最近的迭代 labels Nov 14, 2022
@wklken wklken added this to the Y2022M47 milestone Nov 21, 2022
@wklken wklken mentioned this issue Nov 21, 2022
Canway-shiisa added a commit to Canway-shiisa/bk-user that referenced this issue Nov 23, 2022
@wklken
Copy link
Collaborator

wklken commented Nov 23, 2022

单选框勾选应该附加参数在query里面 /xxxx?key=value

@wklken
Copy link
Collaborator

wklken commented Nov 23, 2022

需要补充下前端的提示文本

@Canway-shiisa
Copy link
Contributor

Canway-shiisa commented Nov 23, 2022

@Xmandon
1.导入在旧的逻辑中就支持用户信息更新了,并且在部门处理上是:如果用户不存在于excel中指定的部门,会新增该用户(并且不会删除原有部门下的该用户);
2. 该issue原始的需求是 部门处理上,变成可选=》假设导入的时候勾选<覆盖更新>,那如果excel中的用户不存在于指定部门中则新增,并且会将该用户从旧的部门中移除【新的原型感觉有点偏差,这个需要确认清楚】

Canway-shiisa added a commit to Canway-shiisa/bk-user that referenced this issue Nov 24, 2022
@wklken
Copy link
Collaborator

wklken commented Nov 25, 2022

新的逻辑: 如果不勾选, 同名用户的数据什么都不会做? 例如更新其某个属性? (相当于忽略所有同名的用户)


需要确认下
代码看着 OK

@Shutulee
Copy link
Collaborator

新的逻辑: 如果不勾选, 同名用户的数据什么都不会做? 例如更新其某个属性? (相当于忽略所有同名的用户)

需要确认下 代码看着 OK

没问题。后续预期是导入操作会分「批量新增」和「批量更新」两个入口来做。「批量新增」只做新增(即不勾选的逻辑),「批量更新」只做更新。

@wklken wklken modified the milestones: Y2022M47, Y2022M48 Nov 28, 2022
@Canway-shiisa
Copy link
Contributor

image
=>
1.【前端】如果勾选<覆盖更新>,需要在导入接口中新增 query参数:is_overwrite =true;未勾选<覆盖更新>则传递is_overwrite =false
2.接口示例:
/api/v1/web/categories/1/operations/sync_or_import/?is_overwrite=true

@wklken wklken modified the milestones: Y2022M48, Y2022M49 Dec 5, 2022
wklken pushed a commit that referenced this issue Dec 6, 2022
* feat: 本地目录导入excel支持选择更新 #728
@wklken
Copy link
Collaborator

wklken commented Dec 6, 2022

需要协调前端开发, 增加交互和请求参数, 合入分支 pre_2.5.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layer: api Api module related Priority: Middlum Middlum priority todo 进入开发排期的状态,纳入了最近的迭代 Type: enhancement Enhancement for existing feature
Projects
None yet
Development

No branches or pull requests

5 participants