签入脚本
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"easygoadmin/api/v1"
|
||||
)
|
||||
|
||||
// 按模块独立拆分(源:gf gen service 产物手工重组)。
|
||||
// logic 方法签名变更时需同步维护本文件(手维护,勿整体运行 gf gen service)。
|
||||
|
||||
// IDept 部门服务接口
|
||||
type IDept interface {
|
||||
// Page 部门分页
|
||||
// 返回平铺的部门列表
|
||||
Page(ctx context.Context, req *v1.DeptPageReq) (res *v1.DeptPageRes, err error)
|
||||
// List 部门平铺列表
|
||||
// 树形结构由前端构建
|
||||
List(ctx context.Context, req *v1.DeptListReq) (res v1.DeptListRes, err error)
|
||||
// Detail 部门详情
|
||||
Detail(ctx context.Context, req *v1.DeptDetailReq) (res *v1.DeptDetailRes, err error)
|
||||
// Add 新增部门
|
||||
Add(ctx context.Context, req *v1.DeptAddReq) (res *v1.IdRes, err error)
|
||||
// Update 修改部门
|
||||
// 禁止将上级设置为自身或后代节点
|
||||
Update(ctx context.Context, req *v1.DeptUpdateReq) (res *v1.DeptUpdateRes, err error)
|
||||
// Delete 删除部门
|
||||
// 存在子部门或用户引用时禁止删除
|
||||
Delete(ctx context.Context, req *v1.DeptDeleteReq) (res *v1.DeptDeleteRes, err error)
|
||||
// BatchDelete 批量删除部门
|
||||
BatchDelete(ctx context.Context, req *v1.DeptBatchDeleteReq) (res *v1.DeptBatchDeleteRes, err error)
|
||||
}
|
||||
|
||||
// localDept 部门服务实现实例
|
||||
var localDept IDept
|
||||
|
||||
// Dept 获取部门服务实例
|
||||
func Dept() IDept {
|
||||
if localDept == nil {
|
||||
panic("implement not found for interface IDept, forgot register?")
|
||||
}
|
||||
return localDept
|
||||
}
|
||||
|
||||
// RegisterDept 注册部门服务实现
|
||||
func RegisterDept(i IDept) {
|
||||
localDept = i
|
||||
}
|
||||
Reference in New Issue
Block a user