添加接口

This commit is contained in:
守护自己的云 2025-04-17 10:06:04 +08:00
parent aabc5d4378
commit 38a35baac8
2 changed files with 27 additions and 0 deletions

7
oa/constant.go Normal file
View File

@ -0,0 +1,7 @@
package oa
type Status = int64 // 出舱状态
const (
StatusDisabled Status = 1 // 启用
StatusEnabled Status = 2 // 禁用
)

View File

@ -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)
}