mirror of
				https://github.com/bufanyun/hotgo.git
				synced 2025-11-04 08:13:45 +08:00 
			
		
		
		
	更新gf版本到v2.2.5
This commit is contained in:
		@@ -64,7 +64,7 @@
 | 
			
		||||
19. 常用工具:集成常用的工具包和命令行工具,可以快速开发自定义命令行,多种启动入口。
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
> HotGo开源以来得到了大家的很多支持,本项目初衷只为互相学习交流,没有任何盈利性目的!欢迎为HotGO贡献代码或提供建议!
 | 
			
		||||
> HotGo开源以来得到了大家的很多支持,本项目初衷只为互相学习交流,没有任何盈利性目的!欢迎为HotGo贡献代码或提供建议!
 | 
			
		||||
 | 
			
		||||
## 演示地址
 | 
			
		||||
-  [https://hotgo.facms.cn/admin](https://hotgo.facms.cn/admin)
 | 
			
		||||
@@ -74,7 +74,7 @@
 | 
			
		||||
## 环境要求
 | 
			
		||||
- node版本 >= v16.0.0
 | 
			
		||||
- golang版本 >= v1.18
 | 
			
		||||
- gf版本 >=v2.2.4 (会保持同步gf最新版本,gf小版本更新可能存在兼容问题,旧版本需自行处理,如非必要不建议更新!)
 | 
			
		||||
- gf版本 >=v2.2.5 (会保持同步gf最新版本,gf小版本更新可能存在兼容问题,旧版本需自行处理,如非必要不建议更新!)
 | 
			
		||||
- IDE推荐:Goland
 | 
			
		||||
- mysql版本 >=5.7
 | 
			
		||||
- redis版本 >=3.0
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,7 @@ require (
 | 
			
		||||
	github.com/dgrijalva/jwt-go v3.2.0+incompatible
 | 
			
		||||
	github.com/go-resty/resty/v2 v2.7.0
 | 
			
		||||
	github.com/gogf/gf/contrib/drivers/mysql/v2 v2.2.0-beta2
 | 
			
		||||
	github.com/gogf/gf/v2 v2.2.4
 | 
			
		||||
	github.com/gogf/gf/v2 v2.2.5
 | 
			
		||||
	github.com/golang/mock v1.6.0 // indirect
 | 
			
		||||
	github.com/gomodule/redigo v1.8.8
 | 
			
		||||
	github.com/google/btree v1.1.2 // indirect
 | 
			
		||||
 
 | 
			
		||||
@@ -127,8 +127,8 @@ github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg78
 | 
			
		||||
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.2.0-beta2 h1:QgVPXrGp8wJx18HIOsNATaIiHjXsd/Rk1F1QyxfWv+g=
 | 
			
		||||
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.2.0-beta2/go.mod h1:z+/0qiOwMroAnj5ESuobTv0l5P83rf+XR3r6Fj8WJyk=
 | 
			
		||||
github.com/gogf/gf/v2 v2.0.0/go.mod h1:apktt6TleWtCIwpz63vBqUnw8MX8gWKoZyxgDpXFtgM=
 | 
			
		||||
github.com/gogf/gf/v2 v2.2.4 h1:Y2c0F4dDDYlQswHPtoGJ0l9kvQjE0a9jmM02qCAZoqo=
 | 
			
		||||
github.com/gogf/gf/v2 v2.2.4/go.mod h1:thvkyb43RWUu/m05sRm4CbH9r7t7/FrW2M56L9Ystwk=
 | 
			
		||||
github.com/gogf/gf/v2 v2.2.5 h1:XyRSfn/gqdrGb03p1OGhXd4q6kVf1BL/pryT2Y1NyBA=
 | 
			
		||||
github.com/gogf/gf/v2 v2.2.5/go.mod h1:thvkyb43RWUu/m05sRm4CbH9r7t7/FrW2M56L9Ystwk=
 | 
			
		||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
 | 
			
		||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
 | 
			
		||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
 | 
			
		||||
 
 | 
			
		||||
@@ -8,5 +8,5 @@ package consts
 | 
			
		||||
 | 
			
		||||
// VersionApp 应用版本
 | 
			
		||||
const (
 | 
			
		||||
	VersionApp = "1.0.0"
 | 
			
		||||
	VersionApp = "2.0.2"
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -56,7 +56,7 @@ func (c *cMonitor) OnlineList(ctx context.Context, req *monitor.OnlineListReq) (
 | 
			
		||||
	var (
 | 
			
		||||
		res     monitor.OnlineListRes
 | 
			
		||||
		clients []*monitor.OnlineModel
 | 
			
		||||
		i       int
 | 
			
		||||
		i       int64
 | 
			
		||||
	)
 | 
			
		||||
 | 
			
		||||
	if c.wsManager.GetClientsLen() == 0 {
 | 
			
		||||
@@ -86,7 +86,7 @@ func (c *cMonitor) OnlineList(ctx context.Context, req *monitor.OnlineListReq) (
 | 
			
		||||
		})
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	res.PageCount = form.CalPageCount(len(clients), req.PerPage)
 | 
			
		||||
	res.PageCount = form.CalPageCount(int64(len(clients)), req.PerPage)
 | 
			
		||||
	res.Page = req.Page
 | 
			
		||||
	res.PerPage = req.PerPage
 | 
			
		||||
 | 
			
		||||
@@ -95,7 +95,7 @@ func (c *cMonitor) OnlineList(ctx context.Context, req *monitor.OnlineListReq) (
 | 
			
		||||
	_, perPage, offset := form.CalPage(ctx, req.Page, req.PerPage)
 | 
			
		||||
 | 
			
		||||
	for k, v := range clients {
 | 
			
		||||
		if k >= offset && i <= perPage {
 | 
			
		||||
		if int64(k) >= offset && i <= perPage {
 | 
			
		||||
			i++
 | 
			
		||||
			if isDemo.Bool() {
 | 
			
		||||
				v.Addr = consts.DemoTips
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,9 @@ package global
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"github.com/gogf/gf/v2"
 | 
			
		||||
	"github.com/gogf/gf/v2/os/gtime"
 | 
			
		||||
	"hotgo/internal/consts"
 | 
			
		||||
	"hotgo/internal/library/location"
 | 
			
		||||
	"hotgo/utility/simple"
 | 
			
		||||
	"os"
 | 
			
		||||
@@ -23,7 +25,7 @@ func Init(ctx context.Context) {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	RootPtah, _ = os.Getwd()
 | 
			
		||||
	fmt.Printf("欢迎使用HotGo!\r\n当前运行环境:%v, 运行根路径为:%v \r\n", SysType, RootPtah)
 | 
			
		||||
	fmt.Printf("欢迎使用HotGo!\r\n当前运行环境:%v, 运行根路径为:%v \r\nHotGo版本:v%v, gf版本:%v \n", SysType, RootPtah, consts.VersionApp, gf.VERSION)
 | 
			
		||||
	loadMonitor(ctx)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -292,7 +292,7 @@ func (s *sAdminMember) View(ctx context.Context, in adminin.MemberViewInp) (res
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List 获取列表
 | 
			
		||||
func (s *sAdminMember) List(ctx context.Context, in adminin.MemberListInp) (list []*adminin.MemberListModel, totalCount int, err error) {
 | 
			
		||||
func (s *sAdminMember) List(ctx context.Context, in adminin.MemberListInp) (list []*adminin.MemberListModel, totalCount int64, err error) {
 | 
			
		||||
	g.Log().Printf(ctx, "in:%#v", in)
 | 
			
		||||
	mod := dao.AdminMember.Ctx(ctx)
 | 
			
		||||
	if in.Realname != "" {
 | 
			
		||||
@@ -325,7 +325,7 @@ func (s *sAdminMember) List(ctx context.Context, in adminin.MemberListInp) (list
 | 
			
		||||
		return list, totalCount, nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
	if err = mod.Page(int(in.Page), int(in.PerPage)).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
		return nil, 0, gerror.Wrap(err, consts.ErrorORM)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -509,7 +509,7 @@ func (s *sAdminMember) Login(ctx context.Context, in adminin.MemberLoginInp) (re
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// RoleMemberList 获取角色下的会员列表
 | 
			
		||||
func (s *sAdminMember) RoleMemberList(ctx context.Context, in adminin.RoleMemberListInp) (list []*adminin.MemberListModel, totalCount int, err error) {
 | 
			
		||||
func (s *sAdminMember) RoleMemberList(ctx context.Context, in adminin.RoleMemberListInp) (list []*adminin.MemberListModel, totalCount int64, err error) {
 | 
			
		||||
	mod := dao.AdminMember.Ctx(ctx)
 | 
			
		||||
	if in.Role > 0 {
 | 
			
		||||
		mod = mod.Where("role", in.Role)
 | 
			
		||||
@@ -521,7 +521,7 @@ func (s *sAdminMember) RoleMemberList(ctx context.Context, in adminin.RoleMember
 | 
			
		||||
		return list, totalCount, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list)
 | 
			
		||||
	err = mod.Page(int(in.Page), int(in.PerPage)).Order("id desc").Scan(&list)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		err = gerror.Wrap(err, consts.ErrorORM)
 | 
			
		||||
		return list, totalCount, err
 | 
			
		||||
 
 | 
			
		||||
@@ -140,7 +140,7 @@ func (s *sAdminNotice) View(ctx context.Context, in adminin.NoticeViewInp) (res
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List 获取列表
 | 
			
		||||
func (s *sAdminNotice) List(ctx context.Context, in adminin.NoticeListInp) (list []*adminin.NoticeListModel, totalCount int, err error) {
 | 
			
		||||
func (s *sAdminNotice) List(ctx context.Context, in adminin.NoticeListInp) (list []*adminin.NoticeListModel, totalCount int64, err error) {
 | 
			
		||||
	mod := dao.AdminNotice.Ctx(ctx)
 | 
			
		||||
 | 
			
		||||
	// 访问路径
 | 
			
		||||
@@ -168,7 +168,7 @@ func (s *sAdminNotice) List(ctx context.Context, in adminin.NoticeListInp) (list
 | 
			
		||||
		return list, totalCount, nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
	if err = mod.Page(int(in.Page), int(in.PerPage)).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
		err = gerror.Wrap(err, consts.ErrorORM)
 | 
			
		||||
		return list, totalCount, err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -153,7 +153,7 @@ func (s *sAdminPost) View(ctx context.Context, in adminin.PostViewInp) (res *adm
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List 获取列表
 | 
			
		||||
func (s *sAdminPost) List(ctx context.Context, in adminin.PostListInp) (list []*adminin.PostListModel, totalCount int, err error) {
 | 
			
		||||
func (s *sAdminPost) List(ctx context.Context, in adminin.PostListInp) (list []*adminin.PostListModel, totalCount int64, err error) {
 | 
			
		||||
	mod := dao.AdminPost.Ctx(ctx)
 | 
			
		||||
 | 
			
		||||
	// 访问路径
 | 
			
		||||
@@ -181,7 +181,7 @@ func (s *sAdminPost) List(ctx context.Context, in adminin.PostListInp) (list []*
 | 
			
		||||
		return list, totalCount, nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
	if err = mod.Page(int(in.Page), int(in.PerPage)).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
		err = gerror.Wrap(err, consts.ErrorORM)
 | 
			
		||||
		return list, totalCount, err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -61,7 +61,7 @@ func (s *sAdminRole) Verify(ctx context.Context, path, method string) bool {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List 获取列表
 | 
			
		||||
func (s *sAdminRole) List(ctx context.Context, in adminin.RoleListInp) (list []*adminin.RoleListModel, totalCount int, err error) {
 | 
			
		||||
func (s *sAdminRole) List(ctx context.Context, in adminin.RoleListInp) (list []*adminin.RoleListModel, totalCount int64, err error) {
 | 
			
		||||
	mod := dao.AdminRole.Ctx(ctx)
 | 
			
		||||
	totalCount, err = mod.Count()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
@@ -69,7 +69,7 @@ func (s *sAdminRole) List(ctx context.Context, in adminin.RoleListInp) (list []*
 | 
			
		||||
		return list, totalCount, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	err = mod.Page(in.Page, in.PerPage).Order("id asc").Scan(&list)
 | 
			
		||||
	err = mod.Page(int(in.Page), int(in.PerPage)).Order("id asc").Scan(&list)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		err = gerror.Wrap(err, consts.ErrorORM)
 | 
			
		||||
		return list, totalCount, err
 | 
			
		||||
 
 | 
			
		||||
@@ -124,7 +124,7 @@ func (s *sSysAttachment) View(ctx context.Context, in sysin.AttachmentViewInp) (
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List 获取列表
 | 
			
		||||
func (s *sSysAttachment) List(ctx context.Context, in sysin.AttachmentListInp) (list []*sysin.AttachmentListModel, totalCount int, err error) {
 | 
			
		||||
func (s *sSysAttachment) List(ctx context.Context, in sysin.AttachmentListInp) (list []*sysin.AttachmentListModel, totalCount int64, err error) {
 | 
			
		||||
	mod := dao.SysAttachment.Ctx(ctx)
 | 
			
		||||
 | 
			
		||||
	// 访问路径
 | 
			
		||||
@@ -152,7 +152,7 @@ func (s *sSysAttachment) List(ctx context.Context, in sysin.AttachmentListInp) (
 | 
			
		||||
		return list, totalCount, nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
	if err = mod.Page(int(in.Page), int(in.PerPage)).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
		err = gerror.Wrap(err, consts.ErrorORM)
 | 
			
		||||
		return list, totalCount, err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -118,7 +118,7 @@ func (s *sSysBlacklist) View(ctx context.Context, in sysin.BlacklistViewInp) (re
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List 获取列表
 | 
			
		||||
func (s *sSysBlacklist) List(ctx context.Context, in sysin.BlacklistListInp) (list []*sysin.BlacklistListModel, totalCount int, err error) {
 | 
			
		||||
func (s *sSysBlacklist) List(ctx context.Context, in sysin.BlacklistListInp) (list []*sysin.BlacklistListModel, totalCount int64, err error) {
 | 
			
		||||
	mod := dao.SysBlacklist.Ctx(ctx)
 | 
			
		||||
 | 
			
		||||
	// 访问路径
 | 
			
		||||
@@ -141,7 +141,7 @@ func (s *sSysBlacklist) List(ctx context.Context, in sysin.BlacklistListInp) (li
 | 
			
		||||
		return list, totalCount, nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
	if err = mod.Page(int(in.Page), int(in.PerPage)).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
		err = gerror.Wrap(err, consts.ErrorORM)
 | 
			
		||||
		return list, totalCount, err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -147,7 +147,7 @@ func (s *sSysCron) View(ctx context.Context, in sysin.CronViewInp) (res *sysin.C
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List 获取列表
 | 
			
		||||
func (s *sSysCron) List(ctx context.Context, in sysin.CronListInp) (list []*sysin.CronListModel, totalCount int, err error) {
 | 
			
		||||
func (s *sSysCron) List(ctx context.Context, in sysin.CronListInp) (list []*sysin.CronListModel, totalCount int64, err error) {
 | 
			
		||||
	mod := dao.SysCron.Ctx(ctx)
 | 
			
		||||
 | 
			
		||||
	// 访问路径
 | 
			
		||||
@@ -170,7 +170,7 @@ func (s *sSysCron) List(ctx context.Context, in sysin.CronListInp) (list []*sysi
 | 
			
		||||
		return list, totalCount, nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
	if err = mod.Page(int(in.Page), int(in.PerPage)).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
		err = gerror.Wrap(err, consts.ErrorORM)
 | 
			
		||||
		return list, totalCount, err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -125,7 +125,7 @@ func (s *sSysCronGroup) View(ctx context.Context, in sysin.CronGroupViewInp) (re
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List 获取列表
 | 
			
		||||
func (s *sSysCronGroup) List(ctx context.Context, in sysin.CronGroupListInp) (list []*sysin.CronGroupListModel, totalCount int, err error) {
 | 
			
		||||
func (s *sSysCronGroup) List(ctx context.Context, in sysin.CronGroupListInp) (list []*sysin.CronGroupListModel, totalCount int64, err error) {
 | 
			
		||||
	mod := dao.SysCronGroup.Ctx(ctx)
 | 
			
		||||
 | 
			
		||||
	// 访问路径
 | 
			
		||||
@@ -148,7 +148,7 @@ func (s *sSysCronGroup) List(ctx context.Context, in sysin.CronGroupListInp) (li
 | 
			
		||||
		return list, totalCount, nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
	if err = mod.Page(int(in.Page), int(in.PerPage)).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
		err = gerror.Wrap(err, consts.ErrorORM)
 | 
			
		||||
		return list, totalCount, err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -82,7 +82,7 @@ func (s *sSysDictData) Edit(ctx context.Context, in sysin.DictDataEditInp) (err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List 获取列表
 | 
			
		||||
func (s *sSysDictData) List(ctx context.Context, in sysin.DictDataListInp) (list []*sysin.DictDataListModel, totalCount int, err error) {
 | 
			
		||||
func (s *sSysDictData) List(ctx context.Context, in sysin.DictDataListInp) (list []*sysin.DictDataListModel, totalCount int64, err error) {
 | 
			
		||||
	mod := dao.SysDictData.Ctx(ctx)
 | 
			
		||||
	// 类型ID
 | 
			
		||||
	if in.TypeID > 0 {
 | 
			
		||||
@@ -117,7 +117,7 @@ func (s *sSysDictData) List(ctx context.Context, in sysin.DictDataListInp) (list
 | 
			
		||||
		return list, totalCount, nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
	if err = mod.Page(int(in.Page), int(in.PerPage)).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
		err = gerror.Wrap(err, consts.ErrorORM)
 | 
			
		||||
		return list, totalCount, err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -293,7 +293,7 @@ func (s *sSysLog) Delete(ctx context.Context, in sysin.LogDeleteInp) error {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List 列表
 | 
			
		||||
func (s *sSysLog) List(ctx context.Context, in sysin.LogListInp) (list []*sysin.LogListModel, totalCount int, err error) {
 | 
			
		||||
func (s *sSysLog) List(ctx context.Context, in sysin.LogListInp) (list []*sysin.LogListModel, totalCount int64, err error) {
 | 
			
		||||
	mod := dao.SysLog.Ctx(ctx)
 | 
			
		||||
 | 
			
		||||
	// 访问路径
 | 
			
		||||
@@ -353,7 +353,7 @@ func (s *sSysLog) List(ctx context.Context, in sysin.LogListInp) (list []*sysin.
 | 
			
		||||
		return list, totalCount, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
	if err = mod.Page(int(in.Page), int(in.PerPage)).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
		err = gerror.Wrap(err, consts.ErrorORM)
 | 
			
		||||
		return list, totalCount, err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -123,7 +123,7 @@ func (s *sSysProvinces) View(ctx context.Context, in sysin.ProvincesViewInp) (re
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List 获取列表
 | 
			
		||||
func (s *sSysProvinces) List(ctx context.Context, in sysin.ProvincesListInp) (list []*sysin.ProvincesListModel, totalCount int, err error) {
 | 
			
		||||
func (s *sSysProvinces) List(ctx context.Context, in sysin.ProvincesListInp) (list []*sysin.ProvincesListModel, totalCount int64, err error) {
 | 
			
		||||
	mod := dao.SysProvinces.Ctx(ctx)
 | 
			
		||||
 | 
			
		||||
	// 访问路径
 | 
			
		||||
@@ -146,7 +146,7 @@ func (s *sSysProvinces) List(ctx context.Context, in sysin.ProvincesListInp) (li
 | 
			
		||||
		return list, totalCount, nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
	if err = mod.Page(int(in.Page), int(in.PerPage)).Order("id desc").Scan(&list); err != nil {
 | 
			
		||||
		err = gerror.Wrap(err, consts.ErrorORM)
 | 
			
		||||
		return list, totalCount, err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -14,8 +14,8 @@ import (
 | 
			
		||||
 | 
			
		||||
// RoleListInp 获取列表
 | 
			
		||||
type RoleListInp struct {
 | 
			
		||||
	Page    int
 | 
			
		||||
	PerPage int
 | 
			
		||||
	Page    int64
 | 
			
		||||
	PerPage int64
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type RoleListModel struct {
 | 
			
		||||
 
 | 
			
		||||
@@ -12,17 +12,17 @@ import (
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
	page     int
 | 
			
		||||
	pageSize int
 | 
			
		||||
	page     int64
 | 
			
		||||
	pageSize int64
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// DefaultPageSize 列表分页默认加载页码
 | 
			
		||||
func DefaultPageSize(ctx context.Context) int {
 | 
			
		||||
func DefaultPageSize(ctx context.Context) int64 {
 | 
			
		||||
	if pageSize > 0 {
 | 
			
		||||
		return pageSize
 | 
			
		||||
	}
 | 
			
		||||
	defaultPageSize, _ := g.Cfg().Get(ctx, "hotgo.admin.defaultPageSize", 10)
 | 
			
		||||
	pageSize = defaultPageSize.Int()
 | 
			
		||||
	pageSize = defaultPageSize.Int64()
 | 
			
		||||
	if pageSize <= 0 {
 | 
			
		||||
		pageSize = 10
 | 
			
		||||
	}
 | 
			
		||||
@@ -30,12 +30,12 @@ func DefaultPageSize(ctx context.Context) int {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// DefaultPage 列表分页默认加载数量
 | 
			
		||||
func DefaultPage(ctx context.Context) int {
 | 
			
		||||
func DefaultPage(ctx context.Context) int64 {
 | 
			
		||||
	if page > 0 {
 | 
			
		||||
		return page
 | 
			
		||||
	}
 | 
			
		||||
	defaultPage, _ := g.Cfg().Get(ctx, "hotgo.admin.defaultPage", 1)
 | 
			
		||||
	page = defaultPage.Int()
 | 
			
		||||
	page = defaultPage.Int64()
 | 
			
		||||
	if page <= 0 {
 | 
			
		||||
		page = 10
 | 
			
		||||
	}
 | 
			
		||||
@@ -44,12 +44,12 @@ func DefaultPage(ctx context.Context) int {
 | 
			
		||||
 | 
			
		||||
// PageReq 分页
 | 
			
		||||
type PageReq struct {
 | 
			
		||||
	Page    int `json:"page" example:"10" d:"1" v:"min:1#页码最小值不能低于1"  dc:"当前页码"`
 | 
			
		||||
	PerPage int `json:"pageSize" example:"1" d:"10" v:"min:1|max:100#|每页数量最小值不能低于1|最大值不能大于100" dc:"每页数量"`
 | 
			
		||||
	Page    int64 `json:"page" example:"10" d:"1" v:"min:1#页码最小值不能低于1"  dc:"当前页码"`
 | 
			
		||||
	PerPage int64 `json:"pageSize" example:"1" d:"10" v:"min:1|max:100#|每页数量最小值不能低于1|最大值不能大于100" dc:"每页数量"`
 | 
			
		||||
}
 | 
			
		||||
type PageRes struct {
 | 
			
		||||
	PageReq
 | 
			
		||||
	PageCount int `json:"pageCount" example:"0" dc:"全部数据量"`
 | 
			
		||||
	PageCount int64 `json:"pageCount" example:"0" dc:"全部数据量"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// RangeDateReq 时间查询
 | 
			
		||||
@@ -64,7 +64,7 @@ type StatusReq struct {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// CalPage 解析分页
 | 
			
		||||
func CalPage(ctx context.Context, page, perPage int) (newPage, newPerPage int, offset int) {
 | 
			
		||||
func CalPage(ctx context.Context, page, perPage int64) (newPage, newPerPage int64, offset int64) {
 | 
			
		||||
	if page <= 0 {
 | 
			
		||||
		newPage = DefaultPage(ctx)
 | 
			
		||||
	} else {
 | 
			
		||||
@@ -80,6 +80,6 @@ func CalPage(ctx context.Context, page, perPage int) (newPage, newPerPage int, o
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func CalPageCount(totalCount, perPage int) int {
 | 
			
		||||
func CalPageCount(totalCount int64, perPage int64) int64 {
 | 
			
		||||
	return (totalCount + perPage - 1) / perPage
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										179
									
								
								server/internal/service/admin.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										179
									
								
								server/internal/service/admin.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,179 @@
 | 
			
		||||
// ================================================================================
 | 
			
		||||
// 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/backend/member"
 | 
			
		||||
	"hotgo/api/backend/menu"
 | 
			
		||||
	"hotgo/api/backend/role"
 | 
			
		||||
	"hotgo/internal/model/input/adminin"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type (
 | 
			
		||||
	IAdminMember interface {
 | 
			
		||||
		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 int64, err error)
 | 
			
		||||
		LoginMemberInfo(ctx context.Context, req *member.InfoReq) (res *adminin.MemberLoginModel, err error)
 | 
			
		||||
		Login(ctx context.Context, in adminin.MemberLoginInp) (res *adminin.MemberLoginModel, err error)
 | 
			
		||||
		RoleMemberList(ctx context.Context, in adminin.RoleMemberListInp) (list []*adminin.MemberListModel, totalCount int64, err error)
 | 
			
		||||
		Status(ctx context.Context, in adminin.MemberStatusInp) (err error)
 | 
			
		||||
		GetIdByCode(ctx context.Context, in adminin.GetIdByCodeInp) (res *adminin.GetIdByCodeModel, err error)
 | 
			
		||||
	}
 | 
			
		||||
	IAdminMemberPost interface {
 | 
			
		||||
		UpdatePostIds(ctx context.Context, member_id int64, post_ids []int64) (err error)
 | 
			
		||||
		GetMemberByIds(ctx context.Context, member_id int64) (post_ids []int64, err error)
 | 
			
		||||
	}
 | 
			
		||||
	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)
 | 
			
		||||
	}
 | 
			
		||||
	IAdminNotice interface {
 | 
			
		||||
		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) (*adminin.NoticeMaxSortModel, error)
 | 
			
		||||
		View(ctx context.Context, in adminin.NoticeViewInp) (res *adminin.NoticeViewModel, err error)
 | 
			
		||||
		List(ctx context.Context, in adminin.NoticeListInp) (list []*adminin.NoticeListModel, totalCount int64, 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 int64, 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) (list []*adminin.RoleListModel, totalCount int64, 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)
 | 
			
		||||
	}
 | 
			
		||||
	IAdminDept interface {
 | 
			
		||||
		NameUnique(ctx context.Context, in adminin.DeptNameUniqueInp) (*adminin.DeptNameUniqueModel, error)
 | 
			
		||||
		Delete(ctx context.Context, in adminin.DeptDeleteInp) 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) (*adminin.DeptMaxSortModel, error)
 | 
			
		||||
		View(ctx context.Context, in adminin.DeptViewInp) (res *adminin.DeptViewModel, err error)
 | 
			
		||||
		List(ctx context.Context, in adminin.DeptListInp) (list adminin.DeptListModel, err error)
 | 
			
		||||
		ListTree(ctx context.Context, in adminin.DeptListTreeInp) (list []*adminin.DeptListTreeModel, err error)
 | 
			
		||||
		GetName(ctx context.Context, id int64) (name string, err error)
 | 
			
		||||
	}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
	localAdminNotice     IAdminNotice
 | 
			
		||||
	localAdminPost       IAdminPost
 | 
			
		||||
	localAdminRole       IAdminRole
 | 
			
		||||
	localAdminDept       IAdminDept
 | 
			
		||||
	localAdminMember     IAdminMember
 | 
			
		||||
	localAdminMemberPost IAdminMemberPost
 | 
			
		||||
	localAdminMenu       IAdminMenu
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func AdminMemberPost() IAdminMemberPost {
 | 
			
		||||
	if localAdminMemberPost == nil {
 | 
			
		||||
		panic("implement not found for interface IAdminMemberPost, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localAdminMemberPost
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterAdminMemberPost(i IAdminMemberPost) {
 | 
			
		||||
	localAdminMemberPost = i
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func AdminMenu() IAdminMenu {
 | 
			
		||||
	if localAdminMenu == nil {
 | 
			
		||||
		panic("implement not found for interface IAdminMenu, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localAdminMenu
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterAdminMenu(i IAdminMenu) {
 | 
			
		||||
	localAdminMenu = i
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
}
 | 
			
		||||
@@ -1,35 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"hotgo/internal/model/input/adminin"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type IAdminDept interface {
 | 
			
		||||
	NameUnique(ctx context.Context, in adminin.DeptNameUniqueInp) (*adminin.DeptNameUniqueModel, error)
 | 
			
		||||
	Delete(ctx context.Context, in adminin.DeptDeleteInp) 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) (*adminin.DeptMaxSortModel, error)
 | 
			
		||||
	View(ctx context.Context, in adminin.DeptViewInp) (res *adminin.DeptViewModel, err error)
 | 
			
		||||
	List(ctx context.Context, in adminin.DeptListInp) (list adminin.DeptListModel, err error)
 | 
			
		||||
	ListTree(ctx context.Context, in adminin.DeptListTreeInp) (list []*adminin.DeptListTreeModel, err error)
 | 
			
		||||
	GetName(ctx context.Context, id int64) (name string, err error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localAdminDept IAdminDept
 | 
			
		||||
 | 
			
		||||
func AdminDept() IAdminDept {
 | 
			
		||||
	if localAdminDept == nil {
 | 
			
		||||
		panic("implement not found for interface IAdminDept, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localAdminDept
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterAdminDept(i IAdminDept) {
 | 
			
		||||
	localAdminDept = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,44 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"hotgo/api/backend/member"
 | 
			
		||||
	"hotgo/internal/model/input/adminin"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type IAdminMember interface {
 | 
			
		||||
	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)
 | 
			
		||||
	LoginMemberInfo(ctx context.Context, req *member.InfoReq) (res *adminin.MemberLoginModel, err error)
 | 
			
		||||
	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)
 | 
			
		||||
	Status(ctx context.Context, in adminin.MemberStatusInp) (err error)
 | 
			
		||||
	GetIdByCode(ctx context.Context, in adminin.GetIdByCodeInp) (res *adminin.GetIdByCodeModel, err error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localAdminMember IAdminMember
 | 
			
		||||
 | 
			
		||||
func AdminMember() IAdminMember {
 | 
			
		||||
	if localAdminMember == nil {
 | 
			
		||||
		panic("implement not found for interface IAdminMember, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localAdminMember
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterAdminMember(i IAdminMember) {
 | 
			
		||||
	localAdminMember = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,27 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type IAdminMemberPost interface {
 | 
			
		||||
	UpdatePostIds(ctx context.Context, member_id int64, post_ids []int64) (err error)
 | 
			
		||||
	GetMemberByIds(ctx context.Context, member_id int64) (post_ids []int64, err error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localAdminMemberPost IAdminMemberPost
 | 
			
		||||
 | 
			
		||||
func AdminMemberPost() IAdminMemberPost {
 | 
			
		||||
	if localAdminMemberPost == nil {
 | 
			
		||||
		panic("implement not found for interface IAdminMemberPost, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localAdminMemberPost
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterAdminMemberPost(i IAdminMemberPost) {
 | 
			
		||||
	localAdminMemberPost = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,38 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"hotgo/api/backend/menu"
 | 
			
		||||
	"hotgo/api/backend/role"
 | 
			
		||||
	"hotgo/internal/model/input/adminin"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
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)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localAdminMenu IAdminMenu
 | 
			
		||||
 | 
			
		||||
func AdminMenu() IAdminMenu {
 | 
			
		||||
	if localAdminMenu == nil {
 | 
			
		||||
		panic("implement not found for interface IAdminMenu, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localAdminMenu
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterAdminMenu(i IAdminMenu) {
 | 
			
		||||
	localAdminMenu = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,32 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"hotgo/internal/model/input/adminin"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type IAdminNotice interface {
 | 
			
		||||
	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) (*adminin.NoticeMaxSortModel, 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)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localAdminNotice IAdminNotice
 | 
			
		||||
 | 
			
		||||
func AdminNotice() IAdminNotice {
 | 
			
		||||
	if localAdminNotice == nil {
 | 
			
		||||
		panic("implement not found for interface IAdminNotice, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localAdminNotice
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterAdminNotice(i IAdminNotice) {
 | 
			
		||||
	localAdminNotice = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,35 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"hotgo/internal/model/input/adminin"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type 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)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localAdminPost IAdminPost
 | 
			
		||||
 | 
			
		||||
func AdminPost() IAdminPost {
 | 
			
		||||
	if localAdminPost == nil {
 | 
			
		||||
		panic("implement not found for interface IAdminPost, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localAdminPost
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterAdminPost(i IAdminPost) {
 | 
			
		||||
	localAdminPost = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,35 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"hotgo/api/backend/role"
 | 
			
		||||
	"hotgo/internal/model/input/adminin"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type IAdminRole interface {
 | 
			
		||||
	Verify(ctx context.Context, path, method string) bool
 | 
			
		||||
	List(ctx context.Context, in adminin.RoleListInp) (list []*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)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localAdminRole IAdminRole
 | 
			
		||||
 | 
			
		||||
func AdminRole() IAdminRole {
 | 
			
		||||
	if localAdminRole == nil {
 | 
			
		||||
		panic("implement not found for interface IAdminRole, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localAdminRole
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterAdminRole(i IAdminRole) {
 | 
			
		||||
	localAdminRole = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// ================================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// You can delete these comments if you wish manually maintain this interface file.
 | 
			
		||||
// ================================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
@@ -11,13 +12,17 @@ import (
 | 
			
		||||
	"github.com/gogf/gf/v2/net/ghttp"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type ICommonUpload interface {
 | 
			
		||||
	UploadImage(ctx context.Context, file *ghttp.UploadFile) (result *sysin.AttachmentListModel, err error)
 | 
			
		||||
	UploadLocal(ctx context.Context, file *ghttp.UploadFile, meta *sysin.UploadFileMeta) (result *sysin.AttachmentListModel, err error)
 | 
			
		||||
	LastUrl(ctx context.Context, fullPath, drive string) string
 | 
			
		||||
}
 | 
			
		||||
type (
 | 
			
		||||
	ICommonUpload interface {
 | 
			
		||||
		UploadImage(ctx context.Context, file *ghttp.UploadFile) (result *sysin.AttachmentListModel, err error)
 | 
			
		||||
		UploadLocal(ctx context.Context, file *ghttp.UploadFile, meta *sysin.UploadFileMeta) (result *sysin.AttachmentListModel, err error)
 | 
			
		||||
		LastUrl(ctx context.Context, fullPath, drive string) string
 | 
			
		||||
	}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var localCommonUpload ICommonUpload
 | 
			
		||||
var (
 | 
			
		||||
	localCommonUpload ICommonUpload
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func CommonUpload() ICommonUpload {
 | 
			
		||||
	if localCommonUpload == nil {
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// ================================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// You can delete these comments if you wish manually maintain this interface file.
 | 
			
		||||
// ================================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
@@ -8,11 +9,15 @@ import (
 | 
			
		||||
	"github.com/gogf/gf/v2/net/ghttp"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type IHook interface {
 | 
			
		||||
	GlobalLog(r *ghttp.Request)
 | 
			
		||||
}
 | 
			
		||||
type (
 | 
			
		||||
	IHook interface {
 | 
			
		||||
		GlobalLog(r *ghttp.Request)
 | 
			
		||||
	}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var localHook IHook
 | 
			
		||||
var (
 | 
			
		||||
	localHook IHook
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func Hook() IHook {
 | 
			
		||||
	if localHook == nil {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// ================================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// You can delete these comments if you wish manually maintain this interface file.
 | 
			
		||||
// ================================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
@@ -8,17 +9,21 @@ import (
 | 
			
		||||
	"github.com/gogf/gf/v2/net/ghttp"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type IMiddleware interface {
 | 
			
		||||
	AdminAuth(r *ghttp.Request)
 | 
			
		||||
	ApiAuth(r *ghttp.Request)
 | 
			
		||||
	Ctx(r *ghttp.Request)
 | 
			
		||||
	CORS(r *ghttp.Request)
 | 
			
		||||
	DemoLimit(r *ghttp.Request)
 | 
			
		||||
	ResponseHandler(r *ghttp.Request)
 | 
			
		||||
	WebSocketToken(r *ghttp.Request)
 | 
			
		||||
}
 | 
			
		||||
type (
 | 
			
		||||
	IMiddleware interface {
 | 
			
		||||
		AdminAuth(r *ghttp.Request)
 | 
			
		||||
		ApiAuth(r *ghttp.Request)
 | 
			
		||||
		Ctx(r *ghttp.Request)
 | 
			
		||||
		CORS(r *ghttp.Request)
 | 
			
		||||
		DemoLimit(r *ghttp.Request)
 | 
			
		||||
		ResponseHandler(r *ghttp.Request)
 | 
			
		||||
		WebSocketToken(r *ghttp.Request)
 | 
			
		||||
	}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var localMiddleware IMiddleware
 | 
			
		||||
var (
 | 
			
		||||
	localMiddleware IMiddleware
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func Middleware() IMiddleware {
 | 
			
		||||
	if localMiddleware == nil {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										200
									
								
								server/internal/service/sys.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										200
									
								
								server/internal/service/sys.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,200 @@
 | 
			
		||||
// ================================================================================
 | 
			
		||||
// 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/internal/library/queue"
 | 
			
		||||
	"hotgo/internal/model"
 | 
			
		||||
	"hotgo/internal/model/entity"
 | 
			
		||||
	"hotgo/internal/model/input/sysin"
 | 
			
		||||
 | 
			
		||||
	"github.com/gogf/gf/v2/frame/g"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type (
 | 
			
		||||
	ISysDictType interface {
 | 
			
		||||
		Tree(ctx context.Context) (list []g.Map, err error)
 | 
			
		||||
		Delete(ctx context.Context, in sysin.DictTypeDeleteInp) error
 | 
			
		||||
		Edit(ctx context.Context, in sysin.DictTypeEditInp) (err error)
 | 
			
		||||
		Select(ctx context.Context, in sysin.DictTypeSelectInp) (list sysin.DictTypeSelectModel, err error)
 | 
			
		||||
	}
 | 
			
		||||
	ISysLog interface {
 | 
			
		||||
		Export(ctx context.Context, in sysin.LogListInp) (err error)
 | 
			
		||||
		RealWrite(ctx context.Context, commonLog entity.SysLog) error
 | 
			
		||||
		AutoLog(ctx context.Context) (err error)
 | 
			
		||||
		QueueJob(ctx context.Context, mqMsg queue.MqMsg) (err error)
 | 
			
		||||
		AnalysisLog(ctx context.Context) entity.SysLog
 | 
			
		||||
		View(ctx context.Context, in sysin.LogViewInp) (res *sysin.LogViewModel, err error)
 | 
			
		||||
		Delete(ctx context.Context, in sysin.LogDeleteInp) error
 | 
			
		||||
		List(ctx context.Context, in sysin.LogListInp) (list []*sysin.LogListModel, totalCount int64, err error)
 | 
			
		||||
	}
 | 
			
		||||
	ISysBlacklist interface {
 | 
			
		||||
		Delete(ctx context.Context, in sysin.BlacklistDeleteInp) error
 | 
			
		||||
		Edit(ctx context.Context, in sysin.BlacklistEditInp) (err error)
 | 
			
		||||
		Status(ctx context.Context, in sysin.BlacklistStatusInp) (err error)
 | 
			
		||||
		MaxSort(ctx context.Context, in sysin.BlacklistMaxSortInp) (*sysin.BlacklistMaxSortModel, error)
 | 
			
		||||
		View(ctx context.Context, in sysin.BlacklistViewInp) (res *sysin.BlacklistViewModel, err error)
 | 
			
		||||
		List(ctx context.Context, in sysin.BlacklistListInp) (list []*sysin.BlacklistListModel, totalCount int64, err error)
 | 
			
		||||
	}
 | 
			
		||||
	ISysConfig interface {
 | 
			
		||||
		GetSmtp(ctx context.Context) (conf *model.EmailConfig, err error)
 | 
			
		||||
		GetConfigByGroup(ctx context.Context, in sysin.GetConfigInp) (*sysin.GetConfigModel, error)
 | 
			
		||||
		ConversionType(ctx context.Context, models *entity.SysConfig) (value interface{}, err error)
 | 
			
		||||
		UpdateConfigByGroup(ctx context.Context, in sysin.UpdateConfigInp) error
 | 
			
		||||
	}
 | 
			
		||||
	ISysCron interface {
 | 
			
		||||
		StartCron(ctx context.Context)
 | 
			
		||||
		Delete(ctx context.Context, in sysin.CronDeleteInp) error
 | 
			
		||||
		Edit(ctx context.Context, in sysin.CronEditInp) (err error)
 | 
			
		||||
		Status(ctx context.Context, in sysin.CronStatusInp) (err error)
 | 
			
		||||
		MaxSort(ctx context.Context, in sysin.CronMaxSortInp) (*sysin.CronMaxSortModel, error)
 | 
			
		||||
		View(ctx context.Context, in sysin.CronViewInp) (res *sysin.CronViewModel, err error)
 | 
			
		||||
		List(ctx context.Context, in sysin.CronListInp) (list []*sysin.CronListModel, totalCount int64, err error)
 | 
			
		||||
	}
 | 
			
		||||
	ISysCronGroup interface {
 | 
			
		||||
		Delete(ctx context.Context, in sysin.CronGroupDeleteInp) error
 | 
			
		||||
		Edit(ctx context.Context, in sysin.CronGroupEditInp) (err error)
 | 
			
		||||
		Status(ctx context.Context, in sysin.CronGroupStatusInp) (err error)
 | 
			
		||||
		MaxSort(ctx context.Context, in sysin.CronGroupMaxSortInp) (*sysin.CronGroupMaxSortModel, error)
 | 
			
		||||
		View(ctx context.Context, in sysin.CronGroupViewInp) (res *sysin.CronGroupViewModel, err error)
 | 
			
		||||
		List(ctx context.Context, in sysin.CronGroupListInp) (list []*sysin.CronGroupListModel, totalCount int64, err error)
 | 
			
		||||
		Select(ctx context.Context, in sysin.CronGroupSelectInp) (list sysin.CronGroupSelectModel, err error)
 | 
			
		||||
	}
 | 
			
		||||
	ISysDictData interface {
 | 
			
		||||
		Delete(ctx context.Context, in sysin.DictDataDeleteInp) error
 | 
			
		||||
		Edit(ctx context.Context, in sysin.DictDataEditInp) (err error)
 | 
			
		||||
		List(ctx context.Context, in sysin.DictDataListInp) (list []*sysin.DictDataListModel, totalCount int64, err error)
 | 
			
		||||
	}
 | 
			
		||||
	ISysAttachment interface {
 | 
			
		||||
		Delete(ctx context.Context, in sysin.AttachmentDeleteInp) error
 | 
			
		||||
		Edit(ctx context.Context, in sysin.AttachmentEditInp) (err error)
 | 
			
		||||
		Status(ctx context.Context, in sysin.AttachmentStatusInp) (err error)
 | 
			
		||||
		MaxSort(ctx context.Context, in sysin.AttachmentMaxSortInp) (*sysin.AttachmentMaxSortModel, error)
 | 
			
		||||
		View(ctx context.Context, in sysin.AttachmentViewInp) (res *sysin.AttachmentViewModel, err error)
 | 
			
		||||
		List(ctx context.Context, in sysin.AttachmentListInp) (list []*sysin.AttachmentListModel, totalCount int64, err error)
 | 
			
		||||
		Add(ctx context.Context, meta *sysin.UploadFileMeta, fullPath, drive string) (data *entity.SysAttachment, err error)
 | 
			
		||||
	}
 | 
			
		||||
	ISysProvinces interface {
 | 
			
		||||
		Delete(ctx context.Context, in sysin.ProvincesDeleteInp) error
 | 
			
		||||
		Edit(ctx context.Context, in sysin.ProvincesEditInp) (err error)
 | 
			
		||||
		Status(ctx context.Context, in sysin.ProvincesStatusInp) (err error)
 | 
			
		||||
		MaxSort(ctx context.Context, in sysin.ProvincesMaxSortInp) (*sysin.ProvincesMaxSortModel, error)
 | 
			
		||||
		View(ctx context.Context, in sysin.ProvincesViewInp) (res *sysin.ProvincesViewModel, err error)
 | 
			
		||||
		List(ctx context.Context, in sysin.ProvincesListInp) (list []*sysin.ProvincesListModel, totalCount int64, err error)
 | 
			
		||||
	}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
	localSysConfig     ISysConfig
 | 
			
		||||
	localSysCron       ISysCron
 | 
			
		||||
	localSysCronGroup  ISysCronGroup
 | 
			
		||||
	localSysDictData   ISysDictData
 | 
			
		||||
	localSysDictType   ISysDictType
 | 
			
		||||
	localSysLog        ISysLog
 | 
			
		||||
	localSysBlacklist  ISysBlacklist
 | 
			
		||||
	localSysProvinces  ISysProvinces
 | 
			
		||||
	localSysAttachment ISysAttachment
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func SysAttachment() ISysAttachment {
 | 
			
		||||
	if localSysAttachment == nil {
 | 
			
		||||
		panic("implement not found for interface ISysAttachment, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysAttachment
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysAttachment(i ISysAttachment) {
 | 
			
		||||
	localSysAttachment = i
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SysProvinces() ISysProvinces {
 | 
			
		||||
	if localSysProvinces == nil {
 | 
			
		||||
		panic("implement not found for interface ISysProvinces, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysProvinces
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysProvinces(i ISysProvinces) {
 | 
			
		||||
	localSysProvinces = i
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SysBlacklist() ISysBlacklist {
 | 
			
		||||
	if localSysBlacklist == nil {
 | 
			
		||||
		panic("implement not found for interface ISysBlacklist, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysBlacklist
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysBlacklist(i ISysBlacklist) {
 | 
			
		||||
	localSysBlacklist = i
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SysConfig() ISysConfig {
 | 
			
		||||
	if localSysConfig == nil {
 | 
			
		||||
		panic("implement not found for interface ISysConfig, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysConfig
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysConfig(i ISysConfig) {
 | 
			
		||||
	localSysConfig = i
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SysCron() ISysCron {
 | 
			
		||||
	if localSysCron == nil {
 | 
			
		||||
		panic("implement not found for interface ISysCron, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysCron
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysCron(i ISysCron) {
 | 
			
		||||
	localSysCron = i
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SysCronGroup() ISysCronGroup {
 | 
			
		||||
	if localSysCronGroup == nil {
 | 
			
		||||
		panic("implement not found for interface ISysCronGroup, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysCronGroup
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysCronGroup(i ISysCronGroup) {
 | 
			
		||||
	localSysCronGroup = i
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SysDictData() ISysDictData {
 | 
			
		||||
	if localSysDictData == nil {
 | 
			
		||||
		panic("implement not found for interface ISysDictData, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysDictData
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysDictData(i ISysDictData) {
 | 
			
		||||
	localSysDictData = i
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SysDictType() ISysDictType {
 | 
			
		||||
	if localSysDictType == nil {
 | 
			
		||||
		panic("implement not found for interface ISysDictType, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysDictType
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysDictType(i ISysDictType) {
 | 
			
		||||
	localSysDictType = i
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SysLog() ISysLog {
 | 
			
		||||
	if localSysLog == nil {
 | 
			
		||||
		panic("implement not found for interface ISysLog, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysLog
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysLog(i ISysLog) {
 | 
			
		||||
	localSysLog = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,34 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"hotgo/internal/model/entity"
 | 
			
		||||
	"hotgo/internal/model/input/sysin"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type ISysAttachment interface {
 | 
			
		||||
	Delete(ctx context.Context, in sysin.AttachmentDeleteInp) error
 | 
			
		||||
	Edit(ctx context.Context, in sysin.AttachmentEditInp) (err error)
 | 
			
		||||
	Status(ctx context.Context, in sysin.AttachmentStatusInp) (err error)
 | 
			
		||||
	MaxSort(ctx context.Context, in sysin.AttachmentMaxSortInp) (*sysin.AttachmentMaxSortModel, error)
 | 
			
		||||
	View(ctx context.Context, in sysin.AttachmentViewInp) (res *sysin.AttachmentViewModel, err error)
 | 
			
		||||
	List(ctx context.Context, in sysin.AttachmentListInp) (list []*sysin.AttachmentListModel, totalCount int, err error)
 | 
			
		||||
	Add(ctx context.Context, meta *sysin.UploadFileMeta, fullPath, drive string) (data *entity.SysAttachment, err error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localSysAttachment ISysAttachment
 | 
			
		||||
 | 
			
		||||
func SysAttachment() ISysAttachment {
 | 
			
		||||
	if localSysAttachment == nil {
 | 
			
		||||
		panic("implement not found for interface ISysAttachment, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysAttachment
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysAttachment(i ISysAttachment) {
 | 
			
		||||
	localSysAttachment = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,32 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"hotgo/internal/model/input/sysin"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type ISysBlacklist interface {
 | 
			
		||||
	Delete(ctx context.Context, in sysin.BlacklistDeleteInp) error
 | 
			
		||||
	Edit(ctx context.Context, in sysin.BlacklistEditInp) (err error)
 | 
			
		||||
	Status(ctx context.Context, in sysin.BlacklistStatusInp) (err error)
 | 
			
		||||
	MaxSort(ctx context.Context, in sysin.BlacklistMaxSortInp) (*sysin.BlacklistMaxSortModel, error)
 | 
			
		||||
	View(ctx context.Context, in sysin.BlacklistViewInp) (res *sysin.BlacklistViewModel, err error)
 | 
			
		||||
	List(ctx context.Context, in sysin.BlacklistListInp) (list []*sysin.BlacklistListModel, totalCount int, err error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localSysBlacklist ISysBlacklist
 | 
			
		||||
 | 
			
		||||
func SysBlacklist() ISysBlacklist {
 | 
			
		||||
	if localSysBlacklist == nil {
 | 
			
		||||
		panic("implement not found for interface ISysBlacklist, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysBlacklist
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysBlacklist(i ISysBlacklist) {
 | 
			
		||||
	localSysBlacklist = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,32 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"hotgo/internal/model"
 | 
			
		||||
	"hotgo/internal/model/entity"
 | 
			
		||||
	"hotgo/internal/model/input/sysin"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type ISysConfig interface {
 | 
			
		||||
	GetSmtp(ctx context.Context) (conf *model.EmailConfig, err error)
 | 
			
		||||
	GetConfigByGroup(ctx context.Context, in sysin.GetConfigInp) (*sysin.GetConfigModel, error)
 | 
			
		||||
	ConversionType(ctx context.Context, models *entity.SysConfig) (value interface{}, err error)
 | 
			
		||||
	UpdateConfigByGroup(ctx context.Context, in sysin.UpdateConfigInp) error
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localSysConfig ISysConfig
 | 
			
		||||
 | 
			
		||||
func SysConfig() ISysConfig {
 | 
			
		||||
	if localSysConfig == nil {
 | 
			
		||||
		panic("implement not found for interface ISysConfig, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysConfig
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysConfig(i ISysConfig) {
 | 
			
		||||
	localSysConfig = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,33 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"hotgo/internal/model/input/sysin"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type ISysCron interface {
 | 
			
		||||
	StartCron(ctx context.Context)
 | 
			
		||||
	Delete(ctx context.Context, in sysin.CronDeleteInp) error
 | 
			
		||||
	Edit(ctx context.Context, in sysin.CronEditInp) (err error)
 | 
			
		||||
	Status(ctx context.Context, in sysin.CronStatusInp) (err error)
 | 
			
		||||
	MaxSort(ctx context.Context, in sysin.CronMaxSortInp) (*sysin.CronMaxSortModel, error)
 | 
			
		||||
	View(ctx context.Context, in sysin.CronViewInp) (res *sysin.CronViewModel, err error)
 | 
			
		||||
	List(ctx context.Context, in sysin.CronListInp) (list []*sysin.CronListModel, totalCount int, err error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localSysCron ISysCron
 | 
			
		||||
 | 
			
		||||
func SysCron() ISysCron {
 | 
			
		||||
	if localSysCron == nil {
 | 
			
		||||
		panic("implement not found for interface ISysCron, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysCron
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysCron(i ISysCron) {
 | 
			
		||||
	localSysCron = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,33 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"hotgo/internal/model/input/sysin"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type ISysCronGroup interface {
 | 
			
		||||
	Delete(ctx context.Context, in sysin.CronGroupDeleteInp) error
 | 
			
		||||
	Edit(ctx context.Context, in sysin.CronGroupEditInp) (err error)
 | 
			
		||||
	Status(ctx context.Context, in sysin.CronGroupStatusInp) (err error)
 | 
			
		||||
	MaxSort(ctx context.Context, in sysin.CronGroupMaxSortInp) (*sysin.CronGroupMaxSortModel, error)
 | 
			
		||||
	View(ctx context.Context, in sysin.CronGroupViewInp) (res *sysin.CronGroupViewModel, err error)
 | 
			
		||||
	List(ctx context.Context, in sysin.CronGroupListInp) (list []*sysin.CronGroupListModel, totalCount int, err error)
 | 
			
		||||
	Select(ctx context.Context, in sysin.CronGroupSelectInp) (list sysin.CronGroupSelectModel, err error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localSysCronGroup ISysCronGroup
 | 
			
		||||
 | 
			
		||||
func SysCronGroup() ISysCronGroup {
 | 
			
		||||
	if localSysCronGroup == nil {
 | 
			
		||||
		panic("implement not found for interface ISysCronGroup, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysCronGroup
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysCronGroup(i ISysCronGroup) {
 | 
			
		||||
	localSysCronGroup = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,29 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"hotgo/internal/model/input/sysin"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type ISysDictData interface {
 | 
			
		||||
	Delete(ctx context.Context, in sysin.DictDataDeleteInp) error
 | 
			
		||||
	Edit(ctx context.Context, in sysin.DictDataEditInp) (err error)
 | 
			
		||||
	List(ctx context.Context, in sysin.DictDataListInp) (list []*sysin.DictDataListModel, totalCount int, err error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localSysDictData ISysDictData
 | 
			
		||||
 | 
			
		||||
func SysDictData() ISysDictData {
 | 
			
		||||
	if localSysDictData == nil {
 | 
			
		||||
		panic("implement not found for interface ISysDictData, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysDictData
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysDictData(i ISysDictData) {
 | 
			
		||||
	localSysDictData = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,32 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"hotgo/internal/model/input/sysin"
 | 
			
		||||
 | 
			
		||||
	"github.com/gogf/gf/v2/frame/g"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type ISysDictType interface {
 | 
			
		||||
	Tree(ctx context.Context) (list []g.Map, err error)
 | 
			
		||||
	Delete(ctx context.Context, in sysin.DictTypeDeleteInp) error
 | 
			
		||||
	Edit(ctx context.Context, in sysin.DictTypeEditInp) (err error)
 | 
			
		||||
	Select(ctx context.Context, in sysin.DictTypeSelectInp) (list sysin.DictTypeSelectModel, err error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localSysDictType ISysDictType
 | 
			
		||||
 | 
			
		||||
func SysDictType() ISysDictType {
 | 
			
		||||
	if localSysDictType == nil {
 | 
			
		||||
		panic("implement not found for interface ISysDictType, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysDictType
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysDictType(i ISysDictType) {
 | 
			
		||||
	localSysDictType = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,36 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"hotgo/internal/library/queue"
 | 
			
		||||
	"hotgo/internal/model/entity"
 | 
			
		||||
	"hotgo/internal/model/input/sysin"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type ISysLog interface {
 | 
			
		||||
	Export(ctx context.Context, in sysin.LogListInp) (err error)
 | 
			
		||||
	RealWrite(ctx context.Context, commonLog entity.SysLog) error
 | 
			
		||||
	AutoLog(ctx context.Context) (err error)
 | 
			
		||||
	QueueJob(ctx context.Context, mqMsg queue.MqMsg) (err error)
 | 
			
		||||
	AnalysisLog(ctx context.Context) entity.SysLog
 | 
			
		||||
	View(ctx context.Context, in sysin.LogViewInp) (res *sysin.LogViewModel, err error)
 | 
			
		||||
	Delete(ctx context.Context, in sysin.LogDeleteInp) error
 | 
			
		||||
	List(ctx context.Context, in sysin.LogListInp) (list []*sysin.LogListModel, totalCount int, err error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localSysLog ISysLog
 | 
			
		||||
 | 
			
		||||
func SysLog() ISysLog {
 | 
			
		||||
	if localSysLog == nil {
 | 
			
		||||
		panic("implement not found for interface ISysLog, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysLog
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysLog(i ISysLog) {
 | 
			
		||||
	localSysLog = i
 | 
			
		||||
}
 | 
			
		||||
@@ -1,32 +0,0 @@
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
 | 
			
		||||
// ==========================================================================
 | 
			
		||||
 | 
			
		||||
package service
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"hotgo/internal/model/input/sysin"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type ISysProvinces interface {
 | 
			
		||||
	Delete(ctx context.Context, in sysin.ProvincesDeleteInp) error
 | 
			
		||||
	Edit(ctx context.Context, in sysin.ProvincesEditInp) (err error)
 | 
			
		||||
	Status(ctx context.Context, in sysin.ProvincesStatusInp) (err error)
 | 
			
		||||
	MaxSort(ctx context.Context, in sysin.ProvincesMaxSortInp) (*sysin.ProvincesMaxSortModel, error)
 | 
			
		||||
	View(ctx context.Context, in sysin.ProvincesViewInp) (res *sysin.ProvincesViewModel, err error)
 | 
			
		||||
	List(ctx context.Context, in sysin.ProvincesListInp) (list []*sysin.ProvincesListModel, totalCount int, err error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var localSysProvinces ISysProvinces
 | 
			
		||||
 | 
			
		||||
func SysProvinces() ISysProvinces {
 | 
			
		||||
	if localSysProvinces == nil {
 | 
			
		||||
		panic("implement not found for interface ISysProvinces, forgot register?")
 | 
			
		||||
	}
 | 
			
		||||
	return localSysProvinces
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterSysProvinces(i ISysProvinces) {
 | 
			
		||||
	localSysProvinces = i
 | 
			
		||||
}
 | 
			
		||||
@@ -15,7 +15,7 @@
 | 
			
		||||
    >
 | 
			
		||||
      <n-descriptions bordered label-placement="left" class="py-2">
 | 
			
		||||
        <n-descriptions-item label="版本">
 | 
			
		||||
          <n-tag type="info"> 2.0.1 </n-tag>
 | 
			
		||||
          <n-tag type="info"> 2.0.2 </n-tag>
 | 
			
		||||
        </n-descriptions-item>
 | 
			
		||||
        <n-descriptions-item label="最后编译时间">
 | 
			
		||||
          <n-tag type="info"> {{ lastBuildTime }} </n-tag>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user