This commit is contained in:
2026-03-18 10:19:42 +08:00
parent 2526ad4414
commit e58dd3529d
267 changed files with 25279 additions and 2 deletions

View File

View File

@@ -0,0 +1,31 @@
package service
import (
"context"
"github.com/tiger1103/gfast/v3/api/v1/system"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
)
type (
IAreaDict interface {
GetAreaDictListSearch(ctx context.Context, req *system.AreaDictListReq) (res *system.AreaDictListRes, err error)
GetAreaDicById(ctx context.Context, ids []string) (area []*model.AreaDictRes, err error)
GetAreaDict(ctx context.Context) (list []*model.AreaDictRes, err error)
}
)
var (
localAreaDict IAreaDict
)
func AreaDict() IAreaDict {
if localAreaDict == nil {
panic("implement not found for interface IAreaDict, forgot register?")
}
return localAreaDict
}
func RegisterAreaDict(i IAreaDict) {
localAreaDict = i
}

View File

@@ -0,0 +1,34 @@
// ================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
)
type IContext interface {
Init(r *ghttp.Request, customCtx *model.Context)
Get(ctx context.Context) *model.Context
SetUser(ctx context.Context, ctxUser *model.ContextUser)
GetLoginUser(ctx context.Context) *model.ContextUser
GetUserId(ctx context.Context) uint64
}
var localContext IContext
func Context() IContext {
if localContext == nil {
panic("implement not found for interface IContext, forgot register?")
}
return localContext
}
func RegisterContext(i IContext) {
localContext = i
}

View File

@@ -0,0 +1,28 @@
// ================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"github.com/gogf/gf/v2/net/ghttp"
)
type IMiddleware interface {
Ctx(r *ghttp.Request)
Auth(r *ghttp.Request)
}
var localMiddleware IMiddleware
func Middleware() IMiddleware {
if localMiddleware == nil {
panic("implement not found for interface IMiddleware, forgot register?")
}
return localMiddleware
}
func RegisterMiddleware(i IMiddleware) {
localMiddleware = i
}

View File

@@ -0,0 +1,32 @@
/*
* @desc:模块租户关系服务
* @company:云南奇讯科技有限公司
* @Author: system
* @Date: 2026/1/6
*/
package service
import (
"context"
"github.com/tiger1103/gfast/v3/api/v1/system"
)
type IModuleTenant interface {
Add(ctx context.Context, req *system.ModuleTenantAddReq) (err error)
AddRedisByTenantId(ctx context.Context, req *system.AddRedisByTenantIdReq) (res *system.AddRedisByTenantIdRes, err error)
}
var localModuleTenant IModuleTenant
func ModuleTenant() IModuleTenant {
if localModuleTenant == nil {
panic("implement not found for interface IModuleTenant, forgot register?")
}
return localModuleTenant
}
func RegisterModuleTenant(i IModuleTenant) {
localModuleTenant = i
}

View File

@@ -0,0 +1,36 @@
// ================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
"github.com/tiger1103/gfast/v3/api/v1/system"
)
type (
IPersonal interface {
GetPersonalInfo(ctx context.Context, req *system.PersonalInfoReq) (res *system.PersonalInfoRes, err error)
EditPersonal(ctx context.Context, req *system.PersonalEditReq) (user *model.LoginUserRes, err error)
ResetPwdPersonal(ctx context.Context, req *system.PersonalResetPwdReq) (res *system.PersonalResetPwdRes, err error)
}
)
var (
localPersonal IPersonal
)
func Personal() IPersonal {
if localPersonal == nil {
panic("implement not found for interface IPersonal, forgot register?")
}
return localPersonal
}
func RegisterPersonal(i IPersonal) {
localPersonal = i
}

View File

@@ -0,0 +1,48 @@
// ================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"github.com/tiger1103/gfast/v3/api/v1/system"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
"github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
)
type (
ISysAuthRule interface {
GetMenuListSearch(ctx context.Context, req *system.RuleSearchReq) (res []*model.SysAuthRuleInfoRes, err error)
GetIsMenuList(ctx context.Context) ([]*model.SysAuthRuleInfoRes, error)
GetMenuList(ctx context.Context) (list []*model.SysAuthRuleInfoRes, err error)
GetMenuListByRole(ctx context.Context) (list []*model.SysAuthRuleInfoRes, err error)
GetIsButtonList(ctx context.Context) ([]*model.SysAuthRuleInfoRes, error)
Add(ctx context.Context, req *system.RuleAddReq) (err error)
BindRoleRule(ctx context.Context, ruleId interface{}, roleIds []uint) (err error)
Get(ctx context.Context, id uint) (rule *entity.SysAuthRule, err error)
GetMenuRoles(ctx context.Context, id uint) (roleIds []uint, err error)
Update(ctx context.Context, req *system.RuleUpdateReq) (err error)
UpdateRoleRule(ctx context.Context, ruleId uint, roleIds []uint) (err error)
GetMenuListTree(pid uint, list []*model.SysAuthRuleInfoRes) []*model.SysAuthRuleTreeRes
DeleteMenuByIds(ctx context.Context, ids []int) (err error)
FindSonByParentId(list []*model.SysAuthRuleInfoRes, pid uint) []*model.SysAuthRuleInfoRes
}
)
var (
localSysAuthRule ISysAuthRule
)
func SysAuthRule() ISysAuthRule {
if localSysAuthRule == nil {
panic("implement not found for interface ISysAuthRule, forgot register?")
}
return localSysAuthRule
}
func RegisterSysAuthRule(i ISysAuthRule) {
localSysAuthRule = i
}

View File

@@ -0,0 +1,38 @@
// ================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"github.com/tiger1103/gfast/v3/api/v1/system"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
"github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
)
type ISysDept interface {
GetList(ctx context.Context, req *system.DeptSearchReq) (list []*entity.SysDept, err error)
GetFromCache(ctx context.Context) (list []*entity.SysDept, err error)
Add(ctx context.Context, req *system.DeptAddReq) (id int64, err error)
Edit(ctx context.Context, req *system.DeptEditReq) (err error)
Delete(ctx context.Context, id uint64) (err error)
FindSonByParentId(deptList []*entity.SysDept, deptId uint64) []*entity.SysDept
GetListTree(pid uint64, list []*entity.SysDept) (deptTree []*model.SysDeptTreeRes)
GetByDeptId(ctx context.Context, deptId uint64) (dept *entity.SysDept, err error)
}
var localSysDept ISysDept
func SysDept() ISysDept {
if localSysDept == nil {
panic("implement not found for interface ISysDept, forgot register?")
}
return localSysDept
}
func RegisterSysDept(i ISysDept) {
localSysDept = i
}

View File

@@ -0,0 +1,33 @@
// ================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"github.com/tiger1103/gfast/v3/api/v1/system"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
)
type ISysLoginLog interface {
Invoke(ctx context.Context, data *model.LoginLogParams)
List(ctx context.Context, req *system.LoginLogSearchReq) (res *system.LoginLogSearchRes, err error)
DeleteLoginLogByIds(ctx context.Context, ids []int) (err error)
ClearLoginLog(ctx context.Context) (err error)
}
var localSysLoginLog ISysLoginLog
func SysLoginLog() ISysLoginLog {
if localSysLoginLog == nil {
panic("implement not found for interface ISysLoginLog, forgot register?")
}
return localSysLoginLog
}
func RegisterSysLoginLog(i ISysLoginLog) {
localSysLoginLog = i
}

View File

@@ -0,0 +1,40 @@
// ================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/tiger1103/gfast/v3/api/v1/system"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
)
type (
IOperateLog interface {
OperationLog(r *ghttp.Request)
Invoke(ctx context.Context, data *model.SysOperLogAdd)
List(ctx context.Context, req *system.SysOperLogSearchReq) (listRes *system.SysOperLogSearchRes, err error)
GetByOperId(ctx context.Context, operId uint64) (res *model.SysOperLogInfoRes, err error)
DeleteByIds(ctx context.Context, ids []uint64) (err error)
ClearLog(ctx context.Context) (err error)
}
)
var (
localOperateLog IOperateLog
)
func OperateLog() IOperateLog {
if localOperateLog == nil {
panic("implement not found for interface IOperateLog, forgot register?")
}
return localOperateLog
}
func RegisterOperateLog(i IOperateLog) {
localOperateLog = i
}

View File

@@ -0,0 +1,34 @@
// ================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"github.com/tiger1103/gfast/v3/api/v1/system"
"github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
)
type ISysPost interface {
List(ctx context.Context, req *system.PostSearchReq) (res *system.PostSearchRes, err error)
Add(ctx context.Context, req *system.PostAddReq) (err error)
Edit(ctx context.Context, req *system.PostEditReq) (err error)
Delete(ctx context.Context, ids []int) (err error)
GetUsedPost(ctx context.Context) (list []*entity.SysPost, err error)
}
var localSysPost ISysPost
func SysPost() ISysPost {
if localSysPost == nil {
panic("implement not found for interface ISysPost, forgot register?")
}
return localSysPost
}
func RegisterSysPost(i ISysPost) {
localSysPost = i
}

View File

@@ -0,0 +1,43 @@
// ================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"github.com/tiger1103/gfast/v3/api/v1/system"
"github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
)
type (
ISysRole interface {
GetRoleListSearch(ctx context.Context, req *system.RoleListReq) (res *system.RoleListRes, err error)
GetRoleList(ctx context.Context) (list []*entity.SysRole, err error)
GetRoleListInfo(ctx context.Context) (list []*entity.SysRole, err error)
AddRoleRule(ctx context.Context, ruleIds []uint, roleId int64) (err error)
DelRoleRule(ctx context.Context, roleId int64) (err error)
AddRole(ctx context.Context, req *system.RoleAddReq) (err error)
Get(ctx context.Context, id uint) (res *entity.SysRole, err error)
GetFilteredNamedPolicy(ctx context.Context, id uint) (gpSlice []int, err error)
EditRole(ctx context.Context, req *system.RoleEditReq) (err error)
DeleteByIds(ctx context.Context, ids []int64) (err error)
}
)
var (
localSysRole ISysRole
)
func SysRole() ISysRole {
if localSysRole == nil {
panic("implement not found for interface ISysRole, forgot register?")
}
return localSysRole
}
func RegisterSysRole(i ISysRole) {
localSysRole = i
}

View File

@@ -0,0 +1,68 @@
// ================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"github.com/gogf/gf/v2/container/gset"
"github.com/gogf/gf/v2/database/gdb"
"github.com/tiger1103/gfast/v3/api/v1/system"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
"github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
)
type (
ISysUser interface {
GetCasBinUserPrefix() string
NotCheckAuthAdminIds(ctx context.Context) *gset.Set
GetAdminUserByUsernamePassword(ctx context.Context, req *system.UserLoginReq) (user *model.LoginUserRes, err error)
GetUserByUsername(ctx context.Context, userName string) (user *model.LoginUserRes, err error)
GetUserById(ctx context.Context, id uint64) (user *model.LoginUserRes, err error)
LoginLog(ctx context.Context, params *model.LoginLogParams)
UpdateLoginInfo(ctx context.Context, id uint64, ip string) (err error)
GetAdminRules(ctx context.Context, userId uint64) (menuList []*model.UserMenus, permissions []string, err error)
GetAdminRole(ctx context.Context, userId uint64, allRoleList []*entity.SysRole) (roles []*entity.SysRole, err error)
GetAdminRoleIds(ctx context.Context, userId uint64) (roleIds []uint, err error)
GetAllMenus(ctx context.Context) (menus []*model.UserMenus, err error)
GetAdminMenusByRoleIds(ctx context.Context, roleIds []uint) (menus []*model.UserMenus, err error)
GetMenusTree(menus []*model.UserMenus, pid uint) []*model.UserMenus
GetPermissions(ctx context.Context, roleIds []uint) (userButtons []string, err error)
List(ctx context.Context, req *system.UserSearchReq) (total interface{}, userList []*entity.SysUser, err error)
GetUsersRoleDept(ctx context.Context, userList []*entity.SysUser) (users []*model.SysUserRoleDeptRes, err error)
GetList(ctx context.Context, req *system.GetUserSearchReq) (total interface{}, userList []*entity.SysUser, err error)
GetUsersRoleDeptInfo(ctx context.Context, userList []*entity.SysUser) (users []*model.SysUserRoleDeptRes, err error)
GetTenantInfo(ctx context.Context, userList []*model.SysUserRoleDeptRes) (user []*model.SysUserRoleDeptRes, err error)
Add(ctx context.Context, req *system.UserAddReq) (res *system.UserAddRes, err error)
Edit(ctx context.Context, req *system.UserEditReq) (err error)
AddUserPost(ctx context.Context, tx gdb.TX, postIds []int64, userId int64) (err error)
EditUserRole(ctx context.Context, roleIds []int64, userId int64) (err error)
UserNameOrMobileExists(ctx context.Context, userName, mobile string, id ...int64) error
GetEditUser(ctx context.Context, id uint64) (res *system.UserGetEditRes, err error)
GetUserInfoById(ctx context.Context, id uint64, withPwd ...bool) (user *entity.SysUser, err error)
GetUserPostIds(ctx context.Context, userId uint64) (postIds []int64, err error)
ResetUserPwd(ctx context.Context, req *system.UserResetPwdReq) (err error)
ChangeUserStatus(ctx context.Context, req *system.UserStatusReq) (err error)
Delete(ctx context.Context, ids []int) (err error)
GetUsers(ctx context.Context, ids []int) (users []*model.SysUserSimpleRes, err error)
IsSuperAdmin(ctx context.Context, req *system.IsSuperAdminReq) (isSuperAdmin bool, err error)
}
)
var (
localSysUser ISysUser
)
func SysUser() ISysUser {
if localSysUser == nil {
panic("implement not found for interface ISysUser, forgot register?")
}
return localSysUser
}
func RegisterSysUser(i ISysUser) {
localSysUser = i
}

View File

@@ -0,0 +1,42 @@
// ================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"github.com/tiger1103/gfast/v3/api/v1/system"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
"github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
)
type (
ISysUserOnline interface {
Invoke(ctx context.Context, params *model.SysUserOnlineParams)
SaveOnline(ctx context.Context, params *model.SysUserOnlineParams)
CheckUserOnline(ctx context.Context)
GetOnlineListPage(ctx context.Context, req *system.SysUserOnlineSearchReq, hasToken ...bool) (res *system.SysUserOnlineSearchRes, err error)
UserIsOnline(ctx context.Context, token string) bool
DeleteOnlineByToken(ctx context.Context, token string) (err error)
ForceLogout(ctx context.Context, ids []int) (err error)
GetInfosByIds(ctx context.Context, ids []int) (onlineList []*entity.SysUserOnline, err error)
}
)
var (
localSysUserOnline ISysUserOnline
)
func SysUserOnline() ISysUserOnline {
if localSysUserOnline == nil {
panic("implement not found for interface ISysUserOnline, forgot register?")
}
return localSysUserOnline
}
func RegisterSysUserOnline(i ISysUserOnline) {
localSysUserOnline = i
}

View File

@@ -0,0 +1,35 @@
package service
import (
"context"
"github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
"github.com/tiger1103/gfast/v3/api/v1/system"
)
type (
ITenant interface {
GetTenantListSearch(ctx context.Context, req *system.TenantListReq) (res *system.TenantListRes, err error)
Add(ctx context.Context, req *system.TenantAddReq) (err error)
Edit(ctx context.Context, req *system.TenantEditReq) (err error)
GetTenantDetailsByIds(ctx context.Context, req *system.GetTenantDetailsByIdsReq) (res *system.GetTenantDetailsByIdsRes, err error)
GetTenantDetails(ctx context.Context, id uint64) (res *entity.Tenant, err error)
GetTenantAdminById(ctx context.Context, id uint64) (res []entity.Tenant, err error)
GetTenantIdList(ctx context.Context, req *system.GetTenantListReq) (res []entity.Tenant, err error)
}
)
var (
localTenant ITenant
)
func Tenant() ITenant {
if localTenant == nil {
panic("implement not found for interface ITenant, forgot register?")
}
return localTenant
}
func RegisterTenant(i ITenant) {
localTenant = i
}

View File

@@ -0,0 +1,33 @@
// ================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"github.com/tiger1103/gfast/v3/internal/app/system/model"
)
type (
ITaskList interface {
AddTask(task *model.TimeTask)
GetByName(funcName string) *model.TimeTask
EditParams(funcName string, params []string)
}
)
var (
localTaskList ITaskList
)
func TaskList() ITaskList {
if localTaskList == nil {
panic("implement not found for interface ITaskList, forgot register?")
}
return localTaskList
}
func RegisterTaskList(i ITaskList) {
localTaskList = i
}

View File

@@ -0,0 +1,38 @@
/*
* @desc:token功能
* @company:云南奇讯科技有限公司
* @Author: yixiaohu
* @Date: 2022/3/8 15:54
*/
package service
import (
"context"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/tiger1103/gfast-token/gftoken"
)
type IGfToken interface {
GenerateToken(ctx context.Context, key string, data interface{}) (keys string, err error)
Middleware(group *ghttp.RouterGroup) error
ParseToken(r *ghttp.Request) (*gftoken.CustomClaims, error)
IsLogin(r *ghttp.Request) (b bool, failed *gftoken.AuthFailed)
GetRequestToken(r *ghttp.Request) (token string)
RemoveToken(ctx context.Context, token string) (err error)
GetTokenData(ctx context.Context, token string) (tData *gftoken.TokenData, key string, err error)
}
var gt IGfToken
func RegisterGToken(gtk IGfToken) {
gt = gtk
}
func GfToken() IGfToken {
if gt == nil {
panic("implement not found for interface IGfToken, forgot register?")
}
return gt
}