diff --git a/oa/constant.go b/oa/constant.go new file mode 100644 index 0000000..3490dc4 --- /dev/null +++ b/oa/constant.go @@ -0,0 +1,7 @@ +package oa + +type Status = int64 // 出舱状态 +const ( + StatusDisabled Status = 1 // 启用 + StatusEnabled Status = 2 // 禁用 +) diff --git a/oa/staff.go b/oa/staff.go index 8bcec23..a187fe0 100644 --- a/oa/staff.go +++ b/oa/staff.go @@ -241,3 +241,23 @@ func (s *staff) SetRoles(ctx context.Context, args ArgsStaffSetRoles) (err error var reply int return xClient.Call(ctx, "SetRoles", args, &reply) } + +// Disable @TITLE 禁用员工 +func (s *staff) Disable(ctx context.Context, staffIds []int64) (err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + var reply int + return xClient.Call(ctx, "Disable", staffIds, &reply) +} + +// Enable @TITLE 启用员工 +func (s *staff) Enable(ctx context.Context, staffIds []int64) (err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + var reply int + return xClient.Call(ctx, "Enable", staffIds, &reply) +}