feat(ik3cloud): 初始化项目基础配置与部门模块
- 添加 .gitignore 忽略规则 - 实现应用配置加载与管理逻辑 - 添加默认配置文件 app.ini - 配置 Gitea CI/CD 工作流用于构建和部署 - 实现金蝶云客户端初始化功能 - 添加 RPC 插件支持 Consul 注册中心 - 实现部门数据获取及树形结构处理逻辑 - 添加通用工具函数库 - 初始化 Go 模块依赖管理 - 创建 Dockerfile 用于服务容器化部署
This commit is contained in:
17
app/controller/department.go
Normal file
17
app/controller/department.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"ik3cloud/app/logic"
|
||||
|
||||
"git.kumo.work/shama/service/ik3cloud"
|
||||
)
|
||||
|
||||
type Department struct {
|
||||
}
|
||||
|
||||
// All @TITLE 获取部门
|
||||
func (d *Department) All(ctx context.Context, args int, reply *[]ik3cloud.DepartmentItem) (err error) {
|
||||
*reply, err = logic.DepartmentLogic.All()
|
||||
return err
|
||||
}
|
||||
21
app/controller/staff.go
Normal file
21
app/controller/staff.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"ik3cloud/app/logic"
|
||||
|
||||
"git.kumo.work/shama/service/ik3cloud"
|
||||
)
|
||||
|
||||
type Staff struct {
|
||||
}
|
||||
|
||||
// List @TITLE 员工列表
|
||||
func (s *Staff) List(ctx context.Context, args ik3cloud.ArgsStaffList, reply *ik3cloud.ReplyStaffList) error {
|
||||
list, total, err := logic.StaffLogic.List(args.Page, args.Search)
|
||||
*reply = ik3cloud.ReplyStaffList{
|
||||
List: list,
|
||||
Total: total,
|
||||
}
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user