hotgo/server/internal/service/admin.go

214 lines
9.3 KiB
Go
Raw Normal View History

2022-12-11 20:48:18 +08:00
// ================================================================================
// 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"
"hotgo/api/admin/menu"
"hotgo/api/admin/role"
2023-02-08 20:29:34 +08:00
"hotgo/internal/library/hgorm/handler"
"hotgo/internal/model"
2022-12-11 20:48:18 +08:00
"hotgo/internal/model/input/adminin"
"hotgo/internal/model/input/form"
"github.com/gogf/gf/v2/database/gdb"
2022-12-11 20:48:18 +08:00
)
type (
IAdminMenu interface {
RoleList(ctx context.Context, in adminin.MenuRoleListInp) (*adminin.MenuRoleListModel, error)
SearchList(ctx context.Context, req *menu.SearchListReq) (*menu.SearchListRes, error)
MaxSort(ctx context.Context, req *menu.MaxSortReq) (*menu.MaxSortRes, error)
NameUnique(ctx context.Context, req *menu.NameUniqueReq) (*menu.NameUniqueRes, error)
CodeUnique(ctx context.Context, req *menu.CodeUniqueReq) (*menu.CodeUniqueRes, error)
Delete(ctx context.Context, req *menu.DeleteReq) error
Edit(ctx context.Context, req *menu.EditReq) (err error)
View(ctx context.Context, req *menu.ViewReq) (res *menu.ViewRes, err error)
List(ctx context.Context, req *menu.ListReq) (lists []map[string]interface{}, err error)
GetMenuList(ctx context.Context, memberId int64) (lists role.DynamicRes, err error)
LoginPermissions(ctx context.Context, memberId int64) (lists adminin.MemberLoginPermissions, err error)
}
IAdminMonitor interface {
StartMonitor(ctx context.Context)
GetMeta(ctx context.Context) *model.MonitorData
}
IAdminNotice interface {
2023-02-08 20:29:34 +08:00
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
Delete(ctx context.Context, in adminin.NoticeDeleteInp) error
Edit(ctx context.Context, in adminin.NoticeEditInp) (err error)
Status(ctx context.Context, in adminin.NoticeStatusInp) (err error)
MaxSort(ctx context.Context, in adminin.NoticeMaxSortInp) (res *adminin.NoticeMaxSortModel, err error)
View(ctx context.Context, in adminin.NoticeViewInp) (res *adminin.NoticeViewModel, err error)
List(ctx context.Context, in adminin.NoticeListInp) (list []*adminin.NoticeListModel, totalCount int, err error)
2023-02-08 20:29:34 +08:00
PullMessages(ctx context.Context, in adminin.PullMessagesInp) (res *adminin.PullMessagesModel, err error)
UnreadCount(ctx context.Context, in adminin.NoticeUnreadCountInp) (res *adminin.NoticeUnreadCountModel, err error)
UpRead(ctx context.Context, in adminin.NoticeUpReadInp) (err error)
ReadAll(ctx context.Context, in adminin.NoticeReadAllInp) (err error)
MessageList(ctx context.Context, in adminin.NoticeMessageListInp) (list []*adminin.NoticeMessageListModel, totalCount int, err error)
}
IAdminPost interface {
Delete(ctx context.Context, in adminin.PostDeleteInp) error
Edit(ctx context.Context, in adminin.PostEditInp) (err error)
MaxSort(ctx context.Context, in adminin.PostMaxSortInp) (*adminin.PostMaxSortModel, error)
NameUnique(ctx context.Context, in adminin.PostNameUniqueInp) (*adminin.PostNameUniqueModel, error)
CodeUnique(ctx context.Context, in adminin.PostCodeUniqueInp) (*adminin.PostCodeUniqueModel, error)
View(ctx context.Context, in adminin.PostViewInp) (res *adminin.PostViewModel, err error)
List(ctx context.Context, in adminin.PostListInp) (list []*adminin.PostListModel, totalCount int, err error)
GetMemberByStartName(ctx context.Context, memberId int64) (name string, err error)
Status(ctx context.Context, in adminin.PostStatusInp) (err error)
}
IAdminRole interface {
Verify(ctx context.Context, path, method string) bool
List(ctx context.Context, in adminin.RoleListInp) (res *adminin.RoleListModel, totalCount int, err error)
GetName(ctx context.Context, RoleId int64) (name string, err error)
GetMemberList(ctx context.Context, RoleId int64) (list []*adminin.RoleListModel, err error)
GetPermissions(ctx context.Context, reqInfo *role.GetPermissionsReq) (MenuIds []int64, err error)
UpdatePermissions(ctx context.Context, reqInfo *role.UpdatePermissionsReq) error
Edit(ctx context.Context, in *role.EditReq) (err error)
Delete(ctx context.Context, in *role.DeleteReq) (err error)
DataScopeSelect(ctx context.Context) (res form.Selects)
DataScopeEdit(ctx context.Context, in *adminin.DataScopeEditInp) (err error)
}
IAdminDept interface {
NameUnique(ctx context.Context, in adminin.DeptNameUniqueInp) (res *adminin.DeptNameUniqueModel, err error)
2023-02-08 20:29:34 +08:00
Delete(ctx context.Context, in adminin.DeptDeleteInp) (err error)
Edit(ctx context.Context, in adminin.DeptEditInp) (err error)
Status(ctx context.Context, in adminin.DeptStatusInp) (err error)
MaxSort(ctx context.Context, in adminin.DeptMaxSortInp) (res *adminin.DeptMaxSortModel, err error)
View(ctx context.Context, in adminin.DeptViewInp) (res *adminin.DeptViewModel, err error)
List(ctx context.Context, in adminin.DeptListInp) (res *adminin.DeptListModel, err error)
GetName(ctx context.Context, id int64) (name string, err error)
}
2022-12-11 20:48:18 +08:00
IAdminMember interface {
2023-02-08 20:29:34 +08:00
UpdateCash(ctx context.Context, in adminin.MemberUpdateCashInp) (err error)
UpdateEmail(ctx context.Context, in adminin.MemberUpdateEmailInp) (err error)
UpdateMobile(ctx context.Context, in adminin.MemberUpdateMobileInp) (err error)
2022-12-11 20:48:18 +08:00
UpdateProfile(ctx context.Context, in adminin.MemberUpdateProfileInp) (err error)
UpdatePwd(ctx context.Context, in adminin.MemberUpdatePwdInp) (err error)
ResetPwd(ctx context.Context, in adminin.MemberResetPwdInp) (err error)
EmailUnique(ctx context.Context, in adminin.MemberEmailUniqueInp) (*adminin.MemberEmailUniqueModel, error)
MobileUnique(ctx context.Context, in adminin.MemberMobileUniqueInp) (*adminin.MemberMobileUniqueModel, error)
NameUnique(ctx context.Context, in adminin.MemberNameUniqueInp) (*adminin.MemberNameUniqueModel, error)
VerifySuperId(ctx context.Context, verifyId int64) bool
Delete(ctx context.Context, in adminin.MemberDeleteInp) error
Edit(ctx context.Context, in adminin.MemberEditInp) (err error)
MaxSort(ctx context.Context, in adminin.MemberMaxSortInp) (*adminin.MemberMaxSortModel, error)
View(ctx context.Context, in adminin.MemberViewInp) (res *adminin.MemberViewModel, err error)
List(ctx context.Context, in adminin.MemberListInp) (list []*adminin.MemberListModel, totalCount int, err error)
2023-02-08 20:29:34 +08:00
LoginMemberInfo(ctx context.Context) (res *adminin.LoginMemberInfoModel, err error)
2022-12-11 20:48:18 +08:00
Login(ctx context.Context, in adminin.MemberLoginInp) (res *adminin.MemberLoginModel, err error)
RoleMemberList(ctx context.Context, in adminin.RoleMemberListInp) (list []*adminin.MemberListModel, totalCount int, err error)
2022-12-11 20:48:18 +08:00
Status(ctx context.Context, in adminin.MemberStatusInp) (err error)
GetIdByCode(ctx context.Context, in adminin.GetIdByCodeInp) (res *adminin.GetIdByCodeModel, err error)
2023-02-08 20:29:34 +08:00
Select(ctx context.Context, in adminin.MemberSelectInp) (res []*adminin.MemberSelectModel, err error)
FilterAuthModel(ctx context.Context, memberId int64) *gdb.Model
MemberLoginStat(ctx context.Context, in adminin.MemberLoginStatInp) (res *adminin.MemberLoginStatModel, err error)
2022-12-11 20:48:18 +08:00
}
IAdminMemberPost interface {
UpdatePostIds(ctx context.Context, memberId int64, postIds []int64) (err error)
GetMemberByIds(ctx context.Context, memberId int64) (postIds []int64, err error)
}
2022-12-11 20:48:18 +08:00
)
var (
2023-03-16 17:01:18 +08:00
localAdminMonitor IAdminMonitor
localAdminNotice IAdminNotice
localAdminPost IAdminPost
2022-12-11 20:48:18 +08:00
localAdminRole IAdminRole
localAdminDept IAdminDept
localAdminMember IAdminMember
2023-02-08 20:29:34 +08:00
localAdminMemberPost IAdminMemberPost
localAdminMenu IAdminMenu
2022-12-11 20:48:18 +08:00
)
func AdminNotice() IAdminNotice {
if localAdminNotice == nil {
panic("implement not found for interface IAdminNotice, forgot register?")
}
return localAdminNotice
}
func RegisterAdminNotice(i IAdminNotice) {
localAdminNotice = i
}
func AdminPost() IAdminPost {
if localAdminPost == nil {
panic("implement not found for interface IAdminPost, forgot register?")
}
return localAdminPost
}
func RegisterAdminPost(i IAdminPost) {
localAdminPost = i
}
func AdminRole() IAdminRole {
if localAdminRole == nil {
panic("implement not found for interface IAdminRole, forgot register?")
}
return localAdminRole
}
func RegisterAdminRole(i IAdminRole) {
localAdminRole = i
}
func AdminDept() IAdminDept {
if localAdminDept == nil {
panic("implement not found for interface IAdminDept, forgot register?")
}
return localAdminDept
}
func RegisterAdminDept(i IAdminDept) {
localAdminDept = i
}
func AdminMember() IAdminMember {
if localAdminMember == nil {
panic("implement not found for interface IAdminMember, forgot register?")
}
return localAdminMember
}
func RegisterAdminMember(i IAdminMember) {
localAdminMember = i
}
func AdminMemberPost() IAdminMemberPost {
if localAdminMemberPost == nil {
panic("implement not found for interface IAdminMemberPost, forgot register?")
}
return localAdminMemberPost
}
func RegisterAdminMemberPost(i IAdminMemberPost) {
localAdminMemberPost = i
}
2023-03-16 17:01:18 +08:00
func AdminMenu() IAdminMenu {
if localAdminMenu == nil {
panic("implement not found for interface IAdminMenu, forgot register?")
}
return localAdminMenu
}
func RegisterAdminMenu(i IAdminMenu) {
localAdminMenu = i
}
func AdminMonitor() IAdminMonitor {
if localAdminMonitor == nil {
panic("implement not found for interface IAdminMonitor, forgot register?")
}
return localAdminMonitor
}
func RegisterAdminMonitor(i IAdminMonitor) {
localAdminMonitor = i
}