添加接口
This commit is contained in:
parent
aabc5d4378
commit
38a35baac8
7
oa/constant.go
Normal file
7
oa/constant.go
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package oa
|
||||||
|
|
||||||
|
type Status = int64 // 出舱状态
|
||||||
|
const (
|
||||||
|
StatusDisabled Status = 1 // 启用
|
||||||
|
StatusEnabled Status = 2 // 禁用
|
||||||
|
)
|
20
oa/staff.go
20
oa/staff.go
@ -241,3 +241,23 @@ func (s *staff) SetRoles(ctx context.Context, args ArgsStaffSetRoles) (err error
|
|||||||
var reply int
|
var reply int
|
||||||
return xClient.Call(ctx, "SetRoles", args, &reply)
|
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)
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user