feat(ik3cloud): 添加部门和员工服务模块
- 新增部门服务,支持获取所有部门信息 - 新增员工服务,支持分页查询员工列表 - 定义部门和员工相关的数据结构 - 实现与远程客户端的调用逻辑 - 集成到主服务入口文件中便于调用 - 添加手机号、状态等员工搜索条件支持
This commit is contained in:
27
ik3cloud/department.go
Normal file
27
ik3cloud/department.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package ik3cloud
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
)
|
||||
|
||||
type department struct {
|
||||
}
|
||||
type DepartmentItem struct {
|
||||
Number *string `json:"number"`
|
||||
Name *string `json:"name"`
|
||||
ParentNumber *string `json:"parentNumber"`
|
||||
ParentName *string `json:"parentName"`
|
||||
Children []*DepartmentItem `json:"children"`
|
||||
}
|
||||
|
||||
// All @TITLE 获取部门
|
||||
func (d *department) All(ctx context.Context) (reply []DepartmentItem, err error) {
|
||||
xClient, err := client.GetClient(d)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "All", 0, &reply)
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user