-
Notifications
You must be signed in to change notification settings - Fork 164
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
feat: 增加假期相关接口及时长组件补充时区信息 #196
Conversation
6f8f2fd
to
0856708
Compare
似乎有个结构体类型转换可以简化,否则 lint 过不了 |
9107d12
to
aeccff7
Compare
updated |
oa.go
Outdated
} | ||
|
||
// SetOAOneUserVacationQuota 修改成员假期余额 | ||
func (c *WorkwxApp) SetOAOneUserVacationQuota(userID, vacationID, leftDuration, remarks string, timeAttr int64) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
啊,不是这个意思。你可以保留先前的公有结构体,但在下边可以直接 cast 到内部 req 类型
func (c *WorkwxApp) OASetOneUserVacationQuota(req *ReqOASOneUserVacationQuota) error {
_, err := c.execOASetOneUserVacationQuota(reqOASetOneUserVacationQuota(*req))
return err
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
然后你可能要把所有 OA
字样不位于最前方的方法名都改一下。由于目前所有接口定义都堆在同一个类型上,按前缀区分大的功能模块会比较易于理解。例如 SetOA*
应为 OASet*
。
您的意思是把诸如GetOATemplateDetail改成OAGetTemplateDetail么?这样有破坏性改动不要紧的么? |
啊,历史上就有不一致的用法了吗,那你看哪种用法多就用哪种 我后边加一堆兼容的名字,然后 deprecate 掉旧的写法,v2 删除,这样应该能比较平滑地迁移了 |
目前看来是 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
获取企业假期管理配置: https://developer.work.weixin.qq.com/document/path/93375
获取成员假期余额: https://developer.work.weixin.qq.com/document/path/93376
修改成员假期余额: https://developer.work.weixin.qq.com/document/path/93377
时长组件:https://developer.work.weixin.qq.com/document/path/91983#%E9%99%8414-%E6%97%B6%E9%95%BF%E7%BB%84%E4%BB%B6%EF%BC%88control%E5%8F%82%E6%95%B0%E4%B8%BAdaterange%EF%BC%89