|
|
|
|
@@ -51,12 +51,12 @@ type ArgsStaffAdd struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add @TITLE 添加员工
|
|
|
|
|
func (s *staff) Add(ctx context.Context, args ArgsStaffAdd) (staffId int64, err error) {
|
|
|
|
|
func (s *staff) Add(ctx context.Context, args ArgsStaffAdd) (entity Entity, err error) {
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
err = xClient.Call(ctx, "Add", args, &staffId)
|
|
|
|
|
err = xClient.Call(ctx, "Add", args, &entity)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -76,31 +76,31 @@ func (s *staff) Edit(ctx context.Context, args ArgsStaffEdit) (err error) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Disable @TITLE 禁用员工
|
|
|
|
|
func (s *staff) Disable(ctx context.Context, numbers []string) (err error) {
|
|
|
|
|
func (s *staff) Disable(ctx context.Context, args Unique) (err error) {
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
var reply int
|
|
|
|
|
return xClient.Call(ctx, "Disable", numbers, &reply)
|
|
|
|
|
return xClient.Call(ctx, "Disable", args, &reply)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Enable @TITLE 启用员工
|
|
|
|
|
func (s *staff) Enable(ctx context.Context, numbers []string) (err error) {
|
|
|
|
|
func (s *staff) Enable(ctx context.Context, args Unique) (err error) {
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
var reply int
|
|
|
|
|
return xClient.Call(ctx, "Enable", numbers, &reply)
|
|
|
|
|
return xClient.Call(ctx, "Enable", args, &reply)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Delete @TITLE 删除员工
|
|
|
|
|
func (s *staff) Delete(ctx context.Context, numbers []string) (err error) {
|
|
|
|
|
func (s *staff) Delete(ctx context.Context, args Unique) (err error) {
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
var reply int
|
|
|
|
|
return xClient.Call(ctx, "Delete", numbers, &reply)
|
|
|
|
|
return xClient.Call(ctx, "Delete", args, &reply)
|
|
|
|
|
}
|
|
|
|
|
|