269 lines
11 KiB
Go
269 lines
11 KiB
Go
// ================================================================================
|
|
// 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"
|
|
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/library/xgorm/handler"
|
|
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
|
|
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/entity"
|
|
|
|
"github.com/gogf/gf/v2/database/gdb"
|
|
)
|
|
|
|
type (
|
|
IAgentDept interface {
|
|
DeptExport(ctx context.Context, in *model.AgentDeptListParam) error
|
|
DeptList(ctx context.Context, in *model.AgentDeptListParam) (list []*model.AgentEnterpriseCustomerModel, total int, err error)
|
|
DeptView(ctx context.Context, deptId int64) (res *model.AgentEnterpriseCustomerModel, err error)
|
|
DeptSave(ctx context.Context, in *model.AgentDeptSaveParam) (deptId int64, err error)
|
|
// EnsureCurrentDeptDefaultRole upgrades legacy child enterprises that did not
|
|
// receive an inherited administrator role when they were created.
|
|
EnsureCurrentDeptDefaultRole(ctx context.Context) error
|
|
// DeptDelete 删除企业客户
|
|
DeptDelete(ctx context.Context, deptId int64) (err error)
|
|
DeptResetPassword(ctx context.Context, deptId int64, password string) (err error)
|
|
// GetDeptApiInfo 获取当前代理商组织的 API 集成信息
|
|
GetDeptApiInfo(ctx context.Context) (res *model.AgentDeptApiModel, err error)
|
|
// SubCompany 获取当前代理商组织的子组织列表
|
|
SubCompany(ctx context.Context) (list []*model.SysDeptTreeModel, err error)
|
|
// IsTopDept 判断当前组织是否为顶级组织
|
|
IsTopDept(ctx context.Context) (isTop bool, dept *entity.SysDept, err error)
|
|
}
|
|
IAgentMenu interface {
|
|
// AllowedMenuIdsByDeptRole 获取当前机构允许的菜单ID
|
|
AllowedMenuIdsByDeptRole(ctx context.Context, deptId int64) (menuIds []int64, err error)
|
|
AllowedMenuTree(ctx context.Context, deptId int64) (tree []*model.SysMenuTreeModel, menuIds []int64, err error)
|
|
}
|
|
IAgentRole interface {
|
|
// RoleList 查询当前登录组织本级角色列表。
|
|
RoleList(ctx context.Context, in *model.AgentRoleListParam) (list []*model.AgentRoleListModel, total int, err error)
|
|
// RoleView 查询角色详情,并返回当前登录组织可分配的菜单树。
|
|
RoleView(ctx context.Context, roleId int64) (res *model.AgentRoleViewModel, err error)
|
|
// RoleSave 保存代理商角色,按角色ID区分新增和修改流程。
|
|
RoleSave(ctx context.Context, in *model.AgentRoleSaveParam) (roleId int64, err error)
|
|
// RoleDelete 删除代理商角色,删除前校验本级机构默认角色不可被删除。
|
|
RoleDelete(ctx context.Context, roleIds []int64) (err error)
|
|
}
|
|
IAgentScope interface {
|
|
ScopeDeptIds(ctx context.Context) (deptIds []int64, err error)
|
|
}
|
|
IAgentUser interface {
|
|
UserExport(ctx context.Context, in *model.AgentUserListParam) error
|
|
// UserList 查询用户列表
|
|
UserList(ctx context.Context, in *model.AgentUserListParam) (list []*model.AgentUserListModel, total int, err error)
|
|
// UserView 查看用户详情
|
|
UserView(ctx context.Context, userId int64) (res *model.AgentUserViewModel, err error)
|
|
// UserSave 新增/修改用户
|
|
UserSave(ctx context.Context, in *model.SysUserAddModel) (res *model.AgentUserViewModel, err error)
|
|
// UserUpdate 更新用户
|
|
UserUpdate(ctx context.Context, in *model.SysUserUpdateModel) (err error)
|
|
// UserDelete 删除用户
|
|
UserDelete(ctx context.Context, userIds []int64) (err error)
|
|
// UserResetPassword 重置用户密码
|
|
UserResetPassword(ctx context.Context, userId int64, password string) (err error)
|
|
}
|
|
IAgentEnterprise interface {
|
|
// Model 企业客户单位信息ORM模型
|
|
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
|
// List 获取企业客户单位信息列表
|
|
List(ctx context.Context, in *model.TAgentEnterpriseListParam) (list []*model.TAgentEnterpriseListModel, totalCount int, err error)
|
|
// Export 导出企业客户单位信息
|
|
Export(ctx context.Context, in *model.TAgentEnterpriseListParam) (err error)
|
|
// Edit 修改/新增企业客户单位信息
|
|
Edit(ctx context.Context, in *model.TAgentEnterpriseEditParam) (err error)
|
|
// Delete 删除企业客户单位信息
|
|
Delete(ctx context.Context, in *model.TAgentEnterpriseDeleteParam) (err error)
|
|
// View 获取企业客户单位信息指定信息
|
|
View(ctx context.Context, in *model.TAgentEnterpriseViewParam) (res *model.TAgentEnterpriseViewModel, err error)
|
|
}
|
|
IAgentTApi interface {
|
|
// Model API集成ORM模型
|
|
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
|
// List 获取API集成列表
|
|
List(ctx context.Context, in *model.TApiListParam) (list []*model.TApiListModel, totalCount int, err error)
|
|
// Export 导出API集成
|
|
Export(ctx context.Context, in *model.TApiListParam) (err error)
|
|
// Edit 修改/新增API集成
|
|
Edit(ctx context.Context, in *model.TApiEditParam) (err error)
|
|
// Delete 删除API集成
|
|
Delete(ctx context.Context, in *model.TApiDeleteParam) (err error)
|
|
// View 获取API集成指定信息
|
|
View(ctx context.Context, in *model.TApiViewParam) (res *model.TApiViewModel, err error)
|
|
}
|
|
IAgentTApiGroup interface {
|
|
// Model 返回开放接口权限组 ORM 模型,默认启用租户和数据权限过滤。
|
|
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
|
// List 分页查询开放接口权限组列表。
|
|
List(ctx context.Context, in *model.TApiGroupListParam) (list []*model.TApiGroupListModel, totalCount int, err error)
|
|
// Export 导出开放接口权限组列表。
|
|
Export(ctx context.Context, in *model.TApiGroupListParam) (err error)
|
|
// Edit 新增或修改开放接口权限组,并同步维护权限组与接口资源的关联。
|
|
Edit(ctx context.Context, in *model.TApiGroupEditParam) (err error)
|
|
// Delete 删除开放接口权限组,并删除该权限组下的资源关联。
|
|
Delete(ctx context.Context, in *model.TApiGroupDeleteParam) (err error)
|
|
// View returns the API group detail with bound resource IDs and resource list.
|
|
View(ctx context.Context, in *model.TApiGroupViewParam) (res *model.TApiGroupViewModel, err error)
|
|
// Status 更新开放接口权限组启停状态。
|
|
Status(ctx context.Context, in *model.TApiGroupStatusParam) (err error)
|
|
}
|
|
IAgentTApiResource interface {
|
|
// Model 返回开放接口资源 ORM 模型,默认启用租户和数据权限过滤。
|
|
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
|
// List 分页查询开放接口资源列表。
|
|
List(ctx context.Context, in *model.TApiResourceListParam) (list []*model.TApiResourceListModel, totalCount int, err error)
|
|
// Export 导出开放接口资源列表。
|
|
Export(ctx context.Context, in *model.TApiResourceListParam) (err error)
|
|
// Edit 新增或修改开放接口资源。
|
|
Edit(ctx context.Context, in *model.TApiResourceEditParam) (err error)
|
|
// Delete 删除开放接口资源,并清理权限组资源关联。
|
|
Delete(ctx context.Context, in *model.TApiResourceDeleteParam) (err error)
|
|
// View 查询开放接口资源详情。
|
|
View(ctx context.Context, in *model.TApiResourceViewParam) (res *model.TApiResourceViewModel, err error)
|
|
// Status 更新开放接口资源启停状态。
|
|
Status(ctx context.Context, in *model.TApiResourceStatusParam) (err error)
|
|
}
|
|
IAgentTCustWithdrawAccount interface {
|
|
// Model 客户提现账户表ORM模型
|
|
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
|
// List 获取客户提现账户表列表
|
|
List(ctx context.Context, in *model.TCustWithdrawAccountListParam) (list []*model.TCustWithdrawAccountListModel, totalCount int, err error)
|
|
// Export 导出客户提现账户表
|
|
Export(ctx context.Context, in *model.TCustWithdrawAccountListParam) (err error)
|
|
// Edit 修改/新增客户提现账户表
|
|
Edit(ctx context.Context, in *model.TCustWithdrawAccountEditParam) (err error)
|
|
// Delete 删除客户提现账户表
|
|
Delete(ctx context.Context, in *model.TCustWithdrawAccountDeleteParam) (err error)
|
|
// View 获取客户提现账户表指定信息
|
|
View(ctx context.Context, in *model.TCustWithdrawAccountViewParam) (res *model.TCustWithdrawAccountViewModel, err error)
|
|
// Status 更新客户提现账户表状态
|
|
Status(ctx context.Context, in *model.TCustWithdrawAccountStatusParam) (err error)
|
|
}
|
|
)
|
|
|
|
var (
|
|
localAgentDept IAgentDept
|
|
localAgentMenu IAgentMenu
|
|
localAgentRole IAgentRole
|
|
localAgentScope IAgentScope
|
|
localAgentUser IAgentUser
|
|
localAgentEnterprise IAgentEnterprise
|
|
localAgentTApi IAgentTApi
|
|
localAgentTApiGroup IAgentTApiGroup
|
|
localAgentTApiResource IAgentTApiResource
|
|
localAgentTCustWithdrawAccount IAgentTCustWithdrawAccount
|
|
)
|
|
|
|
func AgentDept() IAgentDept {
|
|
if localAgentDept == nil {
|
|
panic("implement not found for interface IAgentDept, forgot register?")
|
|
}
|
|
return localAgentDept
|
|
}
|
|
|
|
func RegisterAgentDept(i IAgentDept) {
|
|
localAgentDept = i
|
|
}
|
|
|
|
func AgentMenu() IAgentMenu {
|
|
if localAgentMenu == nil {
|
|
panic("implement not found for interface IAgentMenu, forgot register?")
|
|
}
|
|
return localAgentMenu
|
|
}
|
|
|
|
func RegisterAgentMenu(i IAgentMenu) {
|
|
localAgentMenu = i
|
|
}
|
|
|
|
func AgentRole() IAgentRole {
|
|
if localAgentRole == nil {
|
|
panic("implement not found for interface IAgentRole, forgot register?")
|
|
}
|
|
return localAgentRole
|
|
}
|
|
|
|
func RegisterAgentRole(i IAgentRole) {
|
|
localAgentRole = i
|
|
}
|
|
|
|
func AgentScope() IAgentScope {
|
|
if localAgentScope == nil {
|
|
panic("implement not found for interface IAgentScope, forgot register?")
|
|
}
|
|
return localAgentScope
|
|
}
|
|
|
|
func RegisterAgentScope(i IAgentScope) {
|
|
localAgentScope = i
|
|
}
|
|
|
|
func AgentUser() IAgentUser {
|
|
if localAgentUser == nil {
|
|
panic("implement not found for interface IAgentUser, forgot register?")
|
|
}
|
|
return localAgentUser
|
|
}
|
|
|
|
func RegisterAgentUser(i IAgentUser) {
|
|
localAgentUser = i
|
|
}
|
|
|
|
func AgentEnterprise() IAgentEnterprise {
|
|
if localAgentEnterprise == nil {
|
|
panic("implement not found for interface IAgentEnterprise, forgot register?")
|
|
}
|
|
return localAgentEnterprise
|
|
}
|
|
|
|
func RegisterAgentEnterprise(i IAgentEnterprise) {
|
|
localAgentEnterprise = i
|
|
}
|
|
|
|
func AgentTApi() IAgentTApi {
|
|
if localAgentTApi == nil {
|
|
panic("implement not found for interface IAgentTApi, forgot register?")
|
|
}
|
|
return localAgentTApi
|
|
}
|
|
|
|
func RegisterAgentTApi(i IAgentTApi) {
|
|
localAgentTApi = i
|
|
}
|
|
|
|
func AgentTApiGroup() IAgentTApiGroup {
|
|
if localAgentTApiGroup == nil {
|
|
panic("implement not found for interface IAgentTApiGroup, forgot register?")
|
|
}
|
|
return localAgentTApiGroup
|
|
}
|
|
|
|
func RegisterAgentTApiGroup(i IAgentTApiGroup) {
|
|
localAgentTApiGroup = i
|
|
}
|
|
|
|
func AgentTApiResource() IAgentTApiResource {
|
|
if localAgentTApiResource == nil {
|
|
panic("implement not found for interface IAgentTApiResource, forgot register?")
|
|
}
|
|
return localAgentTApiResource
|
|
}
|
|
|
|
func RegisterAgentTApiResource(i IAgentTApiResource) {
|
|
localAgentTApiResource = i
|
|
}
|
|
|
|
func AgentTCustWithdrawAccount() IAgentTCustWithdrawAccount {
|
|
if localAgentTCustWithdrawAccount == nil {
|
|
panic("implement not found for interface IAgentTCustWithdrawAccount, forgot register?")
|
|
}
|
|
return localAgentTCustWithdrawAccount
|
|
}
|
|
|
|
func RegisterAgentTCustWithdrawAccount(i IAgentTCustWithdrawAccount) {
|
|
localAgentTCustWithdrawAccount = i
|
|
}
|