Files
service/ik3cloud/staff.go
kanade 02fcd437e5 feat(ik3cloud): 添加部门和员工服务模块
- 新增部门服务,支持获取所有部门信息
- 新增员工服务,支持分页查询员工列表
- 定义部门和员工相关的数据结构
- 实现与远程客户端的调用逻辑
- 集成到主服务入口文件中便于调用
- 添加手机号、状态等员工搜索条件支持
2025-11-19 13:47:11 +08:00

43 lines
1014 B
Go

package ik3cloud
import (
"context"
"git.kumo.work/shama/service/client"
"git.kumo.work/shama/service/lib/bean"
)
type staff struct {
}
type ArgsStaffList struct {
Page bean.Page
Search StaffSearch
}
type StaffSearch struct {
Status int64 // 状态 1=启用 2=停用
Name string // 姓名
Phone string // 手机号
}
type ReplyStaffList struct {
List []StaffItem `json:"list"` // 员工列表
Total int64 `json:"total"` // 总数
}
type StaffItem struct {
Number *string `json:"number"` // 工号
Name *string `json:"name"` // 姓名
Position *string `json:"position"` // 职位
Phone *string `json:"phone"` // 账号
Mobile *string `json:"mobile"` // 手机号
Status *string `json:"status"` // 状态
}
// List @TITLE 员工列表
func (s *staff) List(ctx context.Context, args ArgsStaffList) (reply ReplyStaffList, err error) {
xClient, err := client.GetClient(s)
if err != nil {
return
}
err = xClient.Call(ctx, "List", args, &reply)
return
}