发布v2.4.4版本,本次为优化版本。更新内容请查看:https://github.com/bufanyun/hotgo/blob/v2.0/docs/guide-zh-CN/start-update-log.md

This commit is contained in:
孟帅 2023-03-16 15:35:02 +08:00
parent 1acc6d17c4
commit 2c27be12fd
16 changed files with 309 additions and 282 deletions

View File

@ -11,6 +11,11 @@
> 如果升级(覆盖)代码后打开会出现 sql 报错, 请检查更新的数据库格式或自行调整 > 如果升级(覆盖)代码后打开会出现 sql 报错, 请检查更新的数据库格式或自行调整
### v2.4.4
updated 2023.03.16
- 优化优化代码生成多库生成时的菜单sql默认指向默认数据库分组
- 优化优化TCP服务认证机制
### v2.4.2 ### v2.4.2
updated 2023.03.11 updated 2023.03.11
- 修复:修复字典管理列表无法添加/编辑问题 - 修复:修复字典管理列表无法添加/编辑问题

View File

@ -131,6 +131,7 @@
- 字段名小写,多关键字使用下划线分割(关键字尽量全称) - 字段名小写,多关键字使用下划线分割(关键字尽量全称)
- 禁止使用保留字并且尽量少用含有关键词来命名 - 禁止使用保留字并且尽量少用含有关键词来命名
- 临时表必须以tmp_开头、以日期结尾备份表必须以bak_开头、以日期结尾 - 临时表必须以tmp_开头、以日期结尾备份表必须以bak_开头、以日期结尾
- 同数据库表名设置统一前缀,默认是`hg_`
- 插件模块表名建议以`hg_addon_`开头,如:`hg_addon_hgexample_table`,含义:`插件_案例_表格`。在生成代码时可自动识别实体命名为:`Table` - 插件模块表名建议以`hg_addon_`开头,如:`hg_addon_hgexample_table`,含义:`插件_案例_表格`。在生成代码时可自动识别实体命名为:`Table`
#### 基础规范 #### 基础规范

View File

@ -7,5 +7,5 @@ package consts
// VersionApp HotGo版本 // VersionApp HotGo版本
const ( const (
VersionApp = "2.4.2" VersionApp = "2.4.4"
) )

View File

@ -116,7 +116,7 @@ func (l *gCurd) initInput(ctx context.Context, in *CurdPreviewInput) (err error)
return err return err
} }
initStep(ctx, in) initStep(in)
in.options.dictMap = make(g.Map) in.options.dictMap = make(g.Map)
if len(in.Config.Application.Crud.Templates)-1 < in.In.GenTemplate { if len(in.Config.Application.Crud.Templates)-1 < in.In.GenTemplate {
@ -138,7 +138,7 @@ func (l *gCurd) initInput(ctx context.Context, in *CurdPreviewInput) (err error)
return return
} }
func initStep(ctx context.Context, in *CurdPreviewInput) { func initStep(in *CurdPreviewInput) {
in.options.Step = new(CurdStep) in.options.Step = new(CurdStep)
in.options.Step.HasMaxSort = HasMaxSort(in.masterFields) in.options.Step.HasMaxSort = HasMaxSort(in.masterFields)
in.options.Step.HasAdd = gstr.InArray(in.options.HeadOps, "add") in.options.Step.HasAdd = gstr.InArray(in.options.HeadOps, "add")
@ -642,7 +642,7 @@ func (l *gCurd) generateWebViewContent(ctx context.Context, in *CurdPreviewInput
func (l *gCurd) generateSqlContent(ctx context.Context, in *CurdPreviewInput) (err error) { func (l *gCurd) generateSqlContent(ctx context.Context, in *CurdPreviewInput) (err error) {
var ( var (
name = "source.sql" name = "source.sql"
config = g.DB(in.In.DbName).GetConfig() config = g.DB("default").GetConfig()
tplData = g.Map{ tplData = g.Map{
"dbName": config.Name, "dbName": config.Name,
"menuTable": config.Prefix + "admin_menu", "menuTable": config.Prefix + "admin_menu",
@ -652,7 +652,7 @@ func (l *gCurd) generateSqlContent(ctx context.Context, in *CurdPreviewInput) (e
) )
if in.options.Menu.Pid > 0 { if in.options.Menu.Pid > 0 {
tplData["mainComponent"] = "ParentLayout" //gstr.LcFirst(in.In.VarName) tplData["mainComponent"] = "ParentLayout"
} }
genFile.Path = file.MergeAbs(in.Config.Application.Crud.Templates[in.In.GenTemplate].SqlPath, convert.CamelCaseToUnderline(in.In.VarName)+"_menu.sql") genFile.Path = file.MergeAbs(in.Config.Application.Crud.Templates[in.In.GenTemplate].SqlPath, convert.CamelCaseToUnderline(in.In.VarName)+"_menu.sql")

View File

@ -54,10 +54,6 @@ type WhoisRegionData struct {
// WhoisLocation 通过Whois接口查询IP归属地 // WhoisLocation 通过Whois接口查询IP归属地
func WhoisLocation(ctx context.Context, ip string) (*IpLocationData, error) { func WhoisLocation(ctx context.Context, ip string) (*IpLocationData, error) {
if !validate.IsIp(ip) {
return nil, fmt.Errorf("invalid input ip:%v", ip)
}
response, err := g.Client().Timeout(10*time.Second).Get(ctx, whoisApi+ip) response, err := g.Client().Timeout(10*time.Second).Get(ctx, whoisApi+ip)
if err != nil { if err != nil {
return nil, err return nil, err
@ -90,10 +86,6 @@ func WhoisLocation(ctx context.Context, ip string) (*IpLocationData, error) {
// Cz88Find 通过Cz88的IP库查询IP归属地 // Cz88Find 通过Cz88的IP库查询IP归属地
func Cz88Find(ctx context.Context, ip string) (*IpLocationData, error) { func Cz88Find(ctx context.Context, ip string) (*IpLocationData, error) {
if !validate.IsIp(ip) {
return nil, fmt.Errorf("invalid input ip:%v", ip)
}
loc, err := iploc.OpenWithoutIndexes("./resource/ip/qqwry-utf8.dat") loc, err := iploc.OpenWithoutIndexes("./resource/ip/qqwry-utf8.dat")
if err != nil { if err != nil {
return nil, fmt.Errorf("%v for help, please go to: https://github.com/kayon/iploc", err.Error()) return nil, fmt.Errorf("%v for help, please go to: https://github.com/kayon/iploc", err.Error())
@ -129,6 +121,13 @@ func IsJurisByIpTitle(title string) bool {
// GetLocation 获取IP归属地信息 // GetLocation 获取IP归属地信息
func GetLocation(ctx context.Context, ip string) (*IpLocationData, error) { func GetLocation(ctx context.Context, ip string) (*IpLocationData, error) {
if !validate.IsIp(ip) {
return nil, fmt.Errorf("invalid input ip:%v", ip)
}
if validate.IsLocalIPAddr(ip) {
return nil, fmt.Errorf("must be a public ip:%v", ip)
}
method := g.Cfg().MustGet(ctx, "hotgo.ipMethod", "cz88") method := g.Cfg().MustGet(ctx, "hotgo.ipMethod", "cz88")
if method.String() == "whois" { if method.String() == "whois" {
return WhoisLocation(ctx, ip) return WhoisLocation(ctx, ip)

View File

@ -1,9 +1,12 @@
package tcp package tcp
import "github.com/gogf/gf/v2/os/gtime"
// 定时任务 // 定时任务
const ( const (
cronHeartbeatVerify = "tcpHeartbeatVerify" cronHeartbeatVerify = "tcpHeartbeatVerify"
cronHeartbeat = "tcpHeartbeat" cronHeartbeat = "tcpHeartbeat"
cronAuthVerify = "tcpAuthVerify"
) )
// 认证分组 // 认证分组
@ -19,6 +22,7 @@ type AuthMeta struct {
Name string `json:"name"` Name string `json:"name"`
AppId string `json:"appId"` AppId string `json:"appId"`
SecretKey string `json:"secretKey"` SecretKey string `json:"secretKey"`
EndAt *gtime.Time `json:"-"`
} }
// CallbackEvent 回调事件 // CallbackEvent 回调事件

View File

@ -27,9 +27,24 @@ func (server *Server) startCron() {
for _, client := range server.clients { for _, client := range server.clients {
if client.heartbeat < gtime.Timestamp()-300 { if client.heartbeat < gtime.Timestamp()-300 {
client.Conn.Close() client.Conn.Close()
server.Logger.Debugf(server.Ctx, "client heartbeat timeout, about to reconnect.. auth:%+v", client.Auth) server.Logger.Debugf(server.Ctx, "client heartbeat timeout, close conn. auth:%+v", client.Auth)
} }
} }
}, server.getCronKey(cronHeartbeatVerify)) }, server.getCronKey(cronHeartbeatVerify))
} }
// 认证检查
if gcron.Search(server.getCronKey(cronAuthVerify)) == nil {
gcron.AddSingleton(server.Ctx, "@every 300s", func(ctx context.Context) {
if server.clients == nil {
return
}
for _, client := range server.clients {
if client.Auth.EndAt.Before(gtime.Now()) {
client.Conn.Close()
server.Logger.Debugf(server.Ctx, "client auth expired, close conn. auth:%+v", client.Auth)
}
}
}, server.getCronKey(cronAuthVerify))
}
} }

View File

@ -107,6 +107,7 @@ func (server *Server) onServerLogin(args ...interface{}) {
Name: in.Name, Name: in.Name,
AppId: in.AppId, AppId: in.AppId,
SecretKey: models.SecretKey, SecretKey: models.SecretKey,
EndAt: models.EndAt,
}, },
heartbeat: gtime.Timestamp(), heartbeat: gtime.Timestamp(),
} }

View File

@ -240,22 +240,31 @@ func (s *sSysGenCodes) TableSelect(ctx context.Context, in sysin.GenCodesTableSe
continue continue
} }
newValue := v.Value
if config.Prefix != "" {
newValue = gstr.SubStrFromEx(v.Value, config.Prefix)
}
if newValue == "" {
err = gerror.Newf("表名[%v]前缀必须和配置中的前缀设置[%v] 保持一致", v.Value, config.Prefix)
return
}
// 如果是插件模块,则移除掉插件表前缀 // 如果是插件模块,则移除掉插件表前缀
defVarName := gstr.SubStrFromEx(v.Value, config.Prefix) bt, err := gregex.Replace(patternStr, []byte(repStr), []byte(newValue))
bt, err := gregex.Replace(patternStr, []byte(repStr), []byte(defVarName))
if err != nil { if err != nil {
err = gerror.Newf("表名[%v] gregex.Replace err:%v", v.Value, err.Error())
break break
} }
defVarName = gstr.CaseCamel(string(bt))
row := new(sysin.GenCodesTableSelectModel) row := new(sysin.GenCodesTableSelectModel)
row = v row = v
row.DefTableComment = v.Label row.DefTableComment = v.Label
row.DaoName = gstr.CaseCamel(gstr.SubStrFromEx(v.Value, config.Prefix)) row.DaoName = gstr.CaseCamel(newValue)
row.DefVarName = defVarName row.DefVarName = gstr.CaseCamel(string(bt))
row.DefAlias = gstr.CaseCamelLower(gstr.SubStrFromEx(v.Value, config.Prefix)) row.DefAlias = gstr.CaseCamelLower(newValue)
row.Name = fmt.Sprintf("%s (%s)", v.Value, v.Label) row.Name = fmt.Sprintf("%s (%s)", v.Value, v.Label)
row.Label = row.Name row.Label = row.Name
res = append(res, row) res = append(res, row)
} }
return res, nil return res, nil

View File

@ -198,7 +198,7 @@ func (s *sSysLog) AnalysisLog(ctx context.Context) entity.SysLog {
ipData, err := location.GetLocation(ctx, clientIp) ipData, err := location.GetLocation(ctx, clientIp)
if err != nil { if err != nil {
g.Log().Errorf(ctx, "location.GetLocation err:%+v", err) g.Log().Infof(ctx, "location.GetLocation clientIp:%v, err:%+v", clientIp, err)
} }
if ipData == nil { if ipData == nil {
ipData = new(location.IpLocationData) ipData = new(location.IpLocationData)

View File

@ -2,12 +2,8 @@ package tcpclient
import ( import (
"context" "context"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gcron"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/internal/library/network/tcp" "hotgo/internal/library/network/tcp"
"hotgo/internal/model/input/msgin"
"hotgo/internal/service" "hotgo/internal/service"
"hotgo/utility/simple" "hotgo/utility/simple"
) )
@ -37,8 +33,8 @@ func (s *sTCPAuth) Start(ctx context.Context) {
AppId: "mengshuai", AppId: "mengshuai",
SecretKey: "123456", SecretKey: "123456",
}, },
LoginEvent: s.loginEvent, LoginEvent: s.onLoginEvent,
CloseEvent: s.closeEvent, CloseEvent: s.onCloseEvent,
}) })
if err != nil { if err != nil {
g.Log().Infof(ctx, "TCPAuth NewClient fail%+v", err) g.Log().Infof(ctx, "TCPAuth NewClient fail%+v", err)
@ -48,7 +44,7 @@ func (s *sTCPAuth) Start(ctx context.Context) {
s.client = client s.client = client
err = s.client.RegisterRouter(map[string]tcp.RouterHandler{ err = s.client.RegisterRouter(map[string]tcp.RouterHandler{
"ResponseAuthSummary": s.onResponseAuthSummary, // 获取授权信息 // ...
}) })
if err != nil { if err != nil {
@ -63,7 +59,7 @@ func (s *sTCPAuth) Start(ctx context.Context) {
}) })
} }
// Stop 关闭服务 // Stop 停止服务
func (s *sTCPAuth) Stop(ctx context.Context) { func (s *sTCPAuth) Stop(ctx context.Context) {
if s.client != nil { if s.client != nil {
s.client.Stop() s.client.Stop()
@ -71,40 +67,17 @@ func (s *sTCPAuth) Stop(ctx context.Context) {
} }
} }
func (s *sTCPAuth) loginEvent() { // IsLogin 是否已登录认证
// 登录成功后立即请求一次授权信息 func (s *sTCPAuth) IsLogin() bool {
s.client.Write(&msgin.AuthSummary{}) return s.client.IsLogin
// 定时检查授权
gcron.Add(s.client.Ctx, "@every 1200s", func(ctx context.Context) {
if !s.client.IsLogin {
g.Log().Infof(ctx, "TCPAuthVerify client is not logged in, skipped")
return
}
s.client.Write(&msgin.AuthSummary{})
}, "TCPAuthVerify")
} }
func (s *sTCPAuth) closeEvent() { // onLoginEvent 登录认证成功事件
// 关闭连接后,删除定时检查授权 func (s *sTCPAuth) onLoginEvent() {
gcron.Remove("TCPAuthVerify") // ...
} }
func (s *sTCPAuth) onResponseAuthSummary(args ...interface{}) { // onCloseEvent 连接关闭回调事件
var in *msgin.ResponseAuthSummary func (s *sTCPAuth) onCloseEvent() {
if err := gconv.Scan(args[0], &in); err != nil { // ...
s.client.Logger.Infof(s.client.Ctx, "ResponseAuthSummary message Scan failed:%+v, args:%+v", err, args[0])
return
}
s.client.Logger.Infof(s.client.Ctx, "onResponseAuthSummary in:%+v", *in)
// 授权异常
if in.Code != gcode.CodeOK.Code() {
s.client.Logger.Infof(s.client.Ctx, "onResponseAuthSummary authorization verification failed:%+v", in.Message)
s.client.Destroy()
return
}
// 授权通过
// 后续可以做一些操作...
} }

View File

@ -18,6 +18,23 @@ import (
) )
type ( 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 { IAdminNotice interface {
Model(ctx context.Context, option ...*handler.Option) *gdb.Model Model(ctx context.Context, option ...*handler.Option) *gdb.Model
Delete(ctx context.Context, in adminin.NoticeDeleteInp) error Delete(ctx context.Context, in adminin.NoticeDeleteInp) error
@ -94,23 +111,6 @@ type (
UpdatePostIds(ctx context.Context, memberId int64, postIds []int64) (err error) UpdatePostIds(ctx context.Context, memberId int64, postIds []int64) (err error)
GetMemberByIds(ctx context.Context, memberId int64) (postIds []int64, err error) GetMemberByIds(ctx context.Context, memberId int64) (postIds []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)
LoginPermissions(ctx context.Context, memberId int64) (lists adminin.MemberLoginPermissions, err error)
}
IAdminMonitor interface {
StartMonitor(ctx context.Context)
GetMeta(ctx context.Context) *model.MonitorData
}
) )
var ( var (

View File

@ -17,18 +17,6 @@ import (
) )
type ( type (
ISysProvinces interface {
Tree(ctx context.Context) (list []g.Map, err error)
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) (res *sysin.ProvincesMaxSortModel, err 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)
ChildrenList(ctx context.Context, in sysin.ProvincesChildrenListInp) (list []*sysin.ProvincesChildrenListModel, totalCount int, err error)
UniqueId(ctx context.Context, in sysin.ProvincesUniqueIdInp) (res *sysin.ProvincesUniqueIdModel, err error)
Select(ctx context.Context, in sysin.ProvincesSelectInp) (res *sysin.ProvincesSelectModel, err error)
}
ISysCron interface { ISysCron interface {
StartCron(ctx context.Context) StartCron(ctx context.Context)
Delete(ctx context.Context, in sysin.CronDeleteInp) (err error) Delete(ctx context.Context, in sysin.CronDeleteInp) (err error)
@ -39,14 +27,16 @@ type (
List(ctx context.Context, in sysin.CronListInp) (list []*sysin.CronListModel, totalCount int, err error) List(ctx context.Context, in sysin.CronListInp) (list []*sysin.CronListModel, totalCount int, err error)
OnlineExec(ctx context.Context, in sysin.OnlineExecInp) (err error) OnlineExec(ctx context.Context, in sysin.OnlineExecInp) (err error)
} }
ISysCronGroup interface { ISysCurdDemo interface {
Delete(ctx context.Context, in sysin.CronGroupDeleteInp) error Model(ctx context.Context, option ...*handler.Option) *gdb.Model
Edit(ctx context.Context, in sysin.CronGroupEditInp) (err error) List(ctx context.Context, in sysin.CurdDemoListInp) (list []*sysin.CurdDemoListModel, totalCount int, err error)
Status(ctx context.Context, in sysin.CronGroupStatusInp) (err error) Export(ctx context.Context, in sysin.CurdDemoListInp) (err error)
MaxSort(ctx context.Context, in sysin.CronGroupMaxSortInp) (*sysin.CronGroupMaxSortModel, error) Edit(ctx context.Context, in sysin.CurdDemoEditInp) (err error)
View(ctx context.Context, in sysin.CronGroupViewInp) (res *sysin.CronGroupViewModel, err error) Delete(ctx context.Context, in sysin.CurdDemoDeleteInp) (err error)
List(ctx context.Context, in sysin.CronGroupListInp) (list []*sysin.CronGroupListModel, totalCount int, err error) MaxSort(ctx context.Context, in sysin.CurdDemoMaxSortInp) (res *sysin.CurdDemoMaxSortModel, err error)
Select(ctx context.Context, in sysin.CronGroupSelectInp) (res *sysin.CronGroupSelectModel, err error) View(ctx context.Context, in sysin.CurdDemoViewInp) (res *sysin.CurdDemoViewModel, err error)
Status(ctx context.Context, in sysin.CurdDemoStatusInp) (err error)
Switch(ctx context.Context, in sysin.CurdDemoSwitchInp) (err error)
} }
ISysEmsLog interface { ISysEmsLog interface {
Delete(ctx context.Context, in sysin.EmsLogDeleteInp) error Delete(ctx context.Context, in sysin.EmsLogDeleteInp) error
@ -59,6 +49,15 @@ type (
AllowSend(ctx context.Context, models *entity.SysEmsLog, config *model.EmailConfig) (err error) AllowSend(ctx context.Context, models *entity.SysEmsLog, config *model.EmailConfig) (err error)
VerifyCode(ctx context.Context, in sysin.VerifyEmsCodeInp) (err error) VerifyCode(ctx context.Context, in sysin.VerifyEmsCodeInp) (err error)
} }
ISysEmployeeBase interface {
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
List(ctx context.Context, in sysin.EmployeeBaseListInp) (list []*sysin.EmployeeBaseListModel, totalCount int, err error)
Export(ctx context.Context, in sysin.EmployeeBaseListInp) (err error)
Edit(ctx context.Context, in sysin.EmployeeBaseEditInp) (err error)
Delete(ctx context.Context, in sysin.EmployeeBaseDeleteInp) (err error)
View(ctx context.Context, in sysin.EmployeeBaseViewInp) (res *sysin.EmployeeBaseViewModel, err error)
Status(ctx context.Context, in sysin.EmployeeBaseStatusInp) (err error)
}
ISysLoginLog interface { ISysLoginLog interface {
Model(ctx context.Context) *gdb.Model Model(ctx context.Context) *gdb.Model
List(ctx context.Context, in sysin.LoginLogListInp) (list []*sysin.LoginLogListModel, totalCount int, err error) List(ctx context.Context, in sysin.LoginLogListInp) (list []*sysin.LoginLogListModel, totalCount int, err error)
@ -68,13 +67,29 @@ type (
Push(ctx context.Context, in sysin.LoginLogPushInp) Push(ctx context.Context, in sysin.LoginLogPushInp)
RealWrite(ctx context.Context, models entity.SysLoginLog) (err error) RealWrite(ctx context.Context, models entity.SysLoginLog) (err error)
} }
ISysAddons interface { ISysAddonsConfig interface {
List(ctx context.Context, in sysin.AddonsListInp) (list []*sysin.AddonsListModel, totalCount int, err error) GetConfigByGroup(ctx context.Context, in sysin.GetAddonsConfigInp) (res *sysin.GetAddonsConfigModel, err error)
Selects(ctx context.Context, in sysin.AddonsSelectsInp) (res *sysin.AddonsSelectsModel, err error) ConversionType(ctx context.Context, models *entity.SysAddonsConfig) (value interface{}, err error)
Build(ctx context.Context, in sysin.AddonsBuildInp) (err error) UpdateConfigByGroup(ctx context.Context, in sysin.UpdateAddonsConfigInp) error
Install(ctx context.Context, in sysin.AddonsInstallInp) (err error) }
Upgrade(ctx context.Context, in sysin.AddonsUpgradeInp) (err error) ISysBlacklist interface {
UnInstall(ctx context.Context, in sysin.AddonsUnInstallInp) (err error) Delete(ctx context.Context, in sysin.BlacklistDeleteInp) (err 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)
VariableLoad(ctx context.Context, err error)
Load(ctx context.Context)
}
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) (res *sysin.CronGroupSelectModel, err error)
} }
ISysGenCodes interface { ISysGenCodes interface {
Delete(ctx context.Context, in sysin.GenCodesDeleteInp) error Delete(ctx context.Context, in sysin.GenCodesDeleteInp) error
@ -90,19 +105,17 @@ type (
Preview(ctx context.Context, in sysin.GenCodesPreviewInp) (res *sysin.GenCodesPreviewModel, err error) Preview(ctx context.Context, in sysin.GenCodesPreviewInp) (res *sysin.GenCodesPreviewModel, err error)
Build(ctx context.Context, in sysin.GenCodesBuildInp) (err error) Build(ctx context.Context, in sysin.GenCodesBuildInp) (err error)
} }
ISysAddonsConfig interface { ISysProvinces interface {
GetConfigByGroup(ctx context.Context, in sysin.GetAddonsConfigInp) (res *sysin.GetAddonsConfigModel, err error) Tree(ctx context.Context) (list []g.Map, err error)
ConversionType(ctx context.Context, models *entity.SysAddonsConfig) (value interface{}, err error) Delete(ctx context.Context, in sysin.ProvincesDeleteInp) error
UpdateConfigByGroup(ctx context.Context, in sysin.UpdateAddonsConfigInp) error Edit(ctx context.Context, in sysin.ProvincesEditInp) (err error)
} Status(ctx context.Context, in sysin.ProvincesStatusInp) (err error)
ISysAttachment interface { MaxSort(ctx context.Context, in sysin.ProvincesMaxSortInp) (res *sysin.ProvincesMaxSortModel, err error)
Delete(ctx context.Context, in sysin.AttachmentDeleteInp) error View(ctx context.Context, in sysin.ProvincesViewInp) (res *sysin.ProvincesViewModel, err error)
Edit(ctx context.Context, in sysin.AttachmentEditInp) (err error) List(ctx context.Context, in sysin.ProvincesListInp) (list []*sysin.ProvincesListModel, totalCount int, err error)
Status(ctx context.Context, in sysin.AttachmentStatusInp) (err error) ChildrenList(ctx context.Context, in sysin.ProvincesChildrenListInp) (list []*sysin.ProvincesChildrenListModel, totalCount int, err error)
MaxSort(ctx context.Context, in sysin.AttachmentMaxSortInp) (*sysin.AttachmentMaxSortModel, error) UniqueId(ctx context.Context, in sysin.ProvincesUniqueIdInp) (res *sysin.ProvincesUniqueIdModel, err error)
View(ctx context.Context, in sysin.AttachmentViewInp) (res *sysin.AttachmentViewModel, err error) Select(ctx context.Context, in sysin.ProvincesSelectInp) (res *sysin.ProvincesSelectModel, 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)
} }
ISysServeLog interface { ISysServeLog interface {
Model(ctx context.Context) *gdb.Model Model(ctx context.Context) *gdb.Model
@ -124,30 +137,13 @@ type (
AllowSend(ctx context.Context, models *entity.SysSmsLog, config *model.SmsConfig) (err error) AllowSend(ctx context.Context, models *entity.SysSmsLog, config *model.SmsConfig) (err error)
VerifyCode(ctx context.Context, in sysin.VerifyCodeInp) (err error) VerifyCode(ctx context.Context, in sysin.VerifyCodeInp) (err error)
} }
ISysDictType interface { ISysAddons interface {
Tree(ctx context.Context) (list []*sysin.DictTypeTree, err error) List(ctx context.Context, in sysin.AddonsListInp) (list []*sysin.AddonsListModel, totalCount int, err error)
Delete(ctx context.Context, in sysin.DictTypeDeleteInp) error Selects(ctx context.Context, in sysin.AddonsSelectsInp) (res *sysin.AddonsSelectsModel, err error)
Edit(ctx context.Context, in sysin.DictTypeEditInp) (err error) Build(ctx context.Context, in sysin.AddonsBuildInp) (err error)
TreeSelect(ctx context.Context, in sysin.DictTreeSelectInp) (list []*sysin.DictTypeTree, err error) Install(ctx context.Context, in sysin.AddonsInstallInp) (err error)
} Upgrade(ctx context.Context, in sysin.AddonsUpgradeInp) (err error)
ISysLog interface { UnInstall(ctx context.Context, in sysin.AddonsUnInstallInp) (err error)
Export(ctx context.Context, in sysin.LogListInp) (err error)
RealWrite(ctx context.Context, commonLog entity.SysLog) (err error)
AutoLog(ctx context.Context) 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) (err error)
List(ctx context.Context, in sysin.LogListInp) (list []*sysin.LogListModel, totalCount int, err error)
}
ISysBlacklist interface {
Delete(ctx context.Context, in sysin.BlacklistDeleteInp) (err 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)
VariableLoad(ctx context.Context, err error)
Load(ctx context.Context)
} }
ISysConfig interface { ISysConfig interface {
GetLoadCache(ctx context.Context) (conf *model.CacheConfig, err error) GetLoadCache(ctx context.Context) (conf *model.CacheConfig, err error)
@ -164,16 +160,20 @@ type (
ConversionType(ctx context.Context, models *entity.SysConfig) (value interface{}, err error) ConversionType(ctx context.Context, models *entity.SysConfig) (value interface{}, err error)
UpdateConfigByGroup(ctx context.Context, in sysin.UpdateConfigInp) error UpdateConfigByGroup(ctx context.Context, in sysin.UpdateConfigInp) error
} }
ISysCurdDemo interface { ISysDictType interface {
Model(ctx context.Context, option ...*handler.Option) *gdb.Model Tree(ctx context.Context) (list []*sysin.DictTypeTree, err error)
List(ctx context.Context, in sysin.CurdDemoListInp) (list []*sysin.CurdDemoListModel, totalCount int, err error) Delete(ctx context.Context, in sysin.DictTypeDeleteInp) error
Export(ctx context.Context, in sysin.CurdDemoListInp) (err error) Edit(ctx context.Context, in sysin.DictTypeEditInp) (err error)
Edit(ctx context.Context, in sysin.CurdDemoEditInp) (err error) TreeSelect(ctx context.Context, in sysin.DictTreeSelectInp) (list []*sysin.DictTypeTree, err error)
Delete(ctx context.Context, in sysin.CurdDemoDeleteInp) (err error) }
MaxSort(ctx context.Context, in sysin.CurdDemoMaxSortInp) (res *sysin.CurdDemoMaxSortModel, err error) ISysAttachment interface {
View(ctx context.Context, in sysin.CurdDemoViewInp) (res *sysin.CurdDemoViewModel, err error) Delete(ctx context.Context, in sysin.AttachmentDeleteInp) error
Status(ctx context.Context, in sysin.CurdDemoStatusInp) (err error) Edit(ctx context.Context, in sysin.AttachmentEditInp) (err error)
Switch(ctx context.Context, in sysin.CurdDemoSwitchInp) (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)
} }
ISysDictData interface { ISysDictData interface {
Delete(ctx context.Context, in sysin.DictDataDeleteInp) error Delete(ctx context.Context, in sysin.DictDataDeleteInp) error
@ -181,59 +181,47 @@ type (
List(ctx context.Context, in sysin.DictDataListInp) (list []*sysin.DictDataListModel, totalCount int, err error) List(ctx context.Context, in sysin.DictDataListInp) (list []*sysin.DictDataListModel, totalCount int, err error)
Select(ctx context.Context, in sysin.DataSelectInp) (list sysin.DataSelectModel, err error) Select(ctx context.Context, in sysin.DataSelectInp) (list sysin.DataSelectModel, err error)
} }
ISysLog interface {
Export(ctx context.Context, in sysin.LogListInp) (err error)
RealWrite(ctx context.Context, commonLog entity.SysLog) (err error)
AutoLog(ctx context.Context) 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) (err error)
List(ctx context.Context, in sysin.LogListInp) (list []*sysin.LogListModel, totalCount int, err error)
}
) )
var ( var (
localSysAddonsConfig ISysAddonsConfig
localSysAttachment ISysAttachment
localSysServeLog ISysServeLog localSysServeLog ISysServeLog
localSysSmsLog ISysSmsLog localSysSmsLog ISysSmsLog
localSysBlacklist ISysBlacklist localSysAddons ISysAddons
localSysConfig ISysConfig localSysConfig ISysConfig
localSysCurdDemo ISysCurdDemo
localSysDictData ISysDictData
localSysDictType ISysDictType localSysDictType ISysDictType
localSysGenCodes ISysGenCodes
localSysProvinces ISysProvinces
localSysAttachment ISysAttachment
localSysDictData ISysDictData
localSysLog ISysLog localSysLog ISysLog
localSysCron ISysCron localSysCron ISysCron
localSysCronGroup ISysCronGroup localSysCurdDemo ISysCurdDemo
localSysEmsLog ISysEmsLog localSysEmsLog ISysEmsLog
localSysAddonsConfig ISysAddonsConfig
localSysBlacklist ISysBlacklist
localSysCronGroup ISysCronGroup
localSysEmployeeBase ISysEmployeeBase
localSysLoginLog ISysLoginLog localSysLoginLog ISysLoginLog
localSysProvinces ISysProvinces
localSysAddons ISysAddons
localSysGenCodes ISysGenCodes
) )
func SysDictData() ISysDictData { func SysAddonsConfig() ISysAddonsConfig {
if localSysDictData == nil { if localSysAddonsConfig == nil {
panic("implement not found for interface ISysDictData, forgot register?") panic("implement not found for interface ISysAddonsConfig, forgot register?")
} }
return localSysDictData return localSysAddonsConfig
} }
func RegisterSysDictData(i ISysDictData) { func RegisterSysAddonsConfig(i ISysAddonsConfig) {
localSysDictData = i localSysAddonsConfig = 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
} }
func SysBlacklist() ISysBlacklist { func SysBlacklist() ISysBlacklist {
@ -247,26 +235,26 @@ func RegisterSysBlacklist(i ISysBlacklist) {
localSysBlacklist = i localSysBlacklist = i
} }
func SysConfig() ISysConfig { func SysCronGroup() ISysCronGroup {
if localSysConfig == nil { if localSysCronGroup == nil {
panic("implement not found for interface ISysConfig, forgot register?") panic("implement not found for interface ISysCronGroup, forgot register?")
} }
return localSysConfig return localSysCronGroup
} }
func RegisterSysConfig(i ISysConfig) { func RegisterSysCronGroup(i ISysCronGroup) {
localSysConfig = i localSysCronGroup = i
} }
func SysCurdDemo() ISysCurdDemo { func SysEmployeeBase() ISysEmployeeBase {
if localSysCurdDemo == nil { if localSysEmployeeBase == nil {
panic("implement not found for interface ISysCurdDemo, forgot register?") panic("implement not found for interface ISysEmployeeBase, forgot register?")
} }
return localSysCurdDemo return localSysEmployeeBase
} }
func RegisterSysCurdDemo(i ISysCurdDemo) { func RegisterSysEmployeeBase(i ISysEmployeeBase) {
localSysCurdDemo = i localSysEmployeeBase = i
} }
func SysLoginLog() ISysLoginLog { func SysLoginLog() ISysLoginLog {
@ -280,50 +268,6 @@ func RegisterSysLoginLog(i ISysLoginLog) {
localSysLoginLog = i localSysLoginLog = 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 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 SysEmsLog() ISysEmsLog {
if localSysEmsLog == nil {
panic("implement not found for interface ISysEmsLog, forgot register?")
}
return localSysEmsLog
}
func RegisterSysEmsLog(i ISysEmsLog) {
localSysEmsLog = i
}
func SysAddons() ISysAddons { func SysAddons() ISysAddons {
if localSysAddons == nil { if localSysAddons == nil {
panic("implement not found for interface ISysAddons, forgot register?") panic("implement not found for interface ISysAddons, forgot register?")
@ -335,6 +279,28 @@ func RegisterSysAddons(i ISysAddons) {
localSysAddons = i localSysAddons = 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 SysDictType() ISysDictType {
if localSysDictType == nil {
panic("implement not found for interface ISysDictType, forgot register?")
}
return localSysDictType
}
func RegisterSysDictType(i ISysDictType) {
localSysDictType = i
}
func SysGenCodes() ISysGenCodes { func SysGenCodes() ISysGenCodes {
if localSysGenCodes == nil { if localSysGenCodes == nil {
panic("implement not found for interface ISysGenCodes, forgot register?") panic("implement not found for interface ISysGenCodes, forgot register?")
@ -346,6 +312,28 @@ func RegisterSysGenCodes(i ISysGenCodes) {
localSysGenCodes = i localSysGenCodes = 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 SysServeLog() ISysServeLog {
if localSysServeLog == nil {
panic("implement not found for interface ISysServeLog, forgot register?")
}
return localSysServeLog
}
func RegisterSysServeLog(i ISysServeLog) {
localSysServeLog = i
}
func SysSmsLog() ISysSmsLog { func SysSmsLog() ISysSmsLog {
if localSysSmsLog == nil { if localSysSmsLog == nil {
panic("implement not found for interface ISysSmsLog, forgot register?") panic("implement not found for interface ISysSmsLog, forgot register?")
@ -357,17 +345,6 @@ func RegisterSysSmsLog(i ISysSmsLog) {
localSysSmsLog = i localSysSmsLog = i
} }
func SysAddonsConfig() ISysAddonsConfig {
if localSysAddonsConfig == nil {
panic("implement not found for interface ISysAddonsConfig, forgot register?")
}
return localSysAddonsConfig
}
func RegisterSysAddonsConfig(i ISysAddonsConfig) {
localSysAddonsConfig = i
}
func SysAttachment() ISysAttachment { func SysAttachment() ISysAttachment {
if localSysAttachment == nil { if localSysAttachment == nil {
panic("implement not found for interface ISysAttachment, forgot register?") panic("implement not found for interface ISysAttachment, forgot register?")
@ -379,13 +356,57 @@ func RegisterSysAttachment(i ISysAttachment) {
localSysAttachment = i localSysAttachment = i
} }
func SysServeLog() ISysServeLog { func SysDictData() ISysDictData {
if localSysServeLog == nil { if localSysDictData == nil {
panic("implement not found for interface ISysServeLog, forgot register?") panic("implement not found for interface ISysDictData, forgot register?")
} }
return localSysServeLog return localSysDictData
} }
func RegisterSysServeLog(i ISysServeLog) { func RegisterSysDictData(i ISysDictData) {
localSysServeLog = i localSysDictData = i
}
func SysLog() ISysLog {
if localSysLog == nil {
panic("implement not found for interface ISysLog, forgot register?")
}
return localSysLog
}
func RegisterSysLog(i ISysLog) {
localSysLog = 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 SysCurdDemo() ISysCurdDemo {
if localSysCurdDemo == nil {
panic("implement not found for interface ISysCurdDemo, forgot register?")
}
return localSysCurdDemo
}
func RegisterSysCurdDemo(i ISysCurdDemo) {
localSysCurdDemo = i
}
func SysEmsLog() ISysEmsLog {
if localSysEmsLog == nil {
panic("implement not found for interface ISysEmsLog, forgot register?")
}
return localSysEmsLog
}
func RegisterSysEmsLog(i ISysEmsLog) {
localSysEmsLog = i
} }

View File

@ -13,6 +13,7 @@ type (
ITCPAuth interface { ITCPAuth interface {
Start(ctx context.Context) Start(ctx context.Context)
Stop(ctx context.Context) Stop(ctx context.Context)
IsLogin() bool
} }
) )

View File

@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/ -- https://www.phpmyadmin.net/
-- --
-- 主机 localhost:3306 -- 主机 localhost:3306
-- 生成日期 2023-03-13 16:58:42 -- 生成日期 2023-03-16 15:25:23
-- 服务器版本 5.7.38-log -- 服务器版本 5.7.38-log
-- PHP 版本 5.6.40 -- PHP 版本 5.6.40
@ -155,7 +155,7 @@ CREATE TABLE `hg_admin_member` (
-- --
INSERT INTO `hg_admin_member` (`id`, `dept_id`, `role_id`, `real_name`, `username`, `password_hash`, `salt`, `auth_key`, `password_reset_token`, `balance`, `avatar`, `sex`, `qq`, `email`, `mobile`, `birthday`, `city_id`, `address`, `pid`, `level`, `tree`, `cash`, `last_active_at`, `remark`, `status`, `created_at`, `updated_at`) VALUES INSERT INTO `hg_admin_member` (`id`, `dept_id`, `role_id`, `real_name`, `username`, `password_hash`, `salt`, `auth_key`, `password_reset_token`, `balance`, `avatar`, `sex`, `qq`, `email`, `mobile`, `birthday`, `city_id`, `address`, `pid`, `level`, `tree`, `cash`, `last_active_at`, `remark`, `status`, `created_at`, `updated_at`) VALUES
(1, 100, 1, '孟帅', 'admin', 'a7c588fffeb2c1d99b29879d7fe97c78', '6541561', '58d8b63af5f7fccd87b052539c0a090e', '', '0.00', 'http://bufanyun.cn-bj.ufileos.com/hotgo/attachment/2023-02-09/cqdq8er9nfkchdopav.png', 1, '133814250', '133814250@qq.com', '15303830571', '2016-04-16', 410172, '莲花街001号', 0, 1, '', '{\"name\": \"孟帅\", \"account\": \"15303830571\", \"payeeCode\": \"http://bufanyun.cn-bj.ufileos.com/hotgo/attachment/2023-02-09/cqdq8mqal5isvcb58g.jpg\"}', '2023-03-11 16:55:34', NULL, 1, '2021-02-12 17:59:45', '2023-03-11 16:55:33'), (1, 100, 1, '孟帅', 'admin', 'a7c588fffeb2c1d99b29879d7fe97c78', '6541561', '799923d21be374d4fa9a0775eb24ca86', '', '0.00', 'http://bufanyun.cn-bj.ufileos.com/hotgo/attachment/2023-02-09/cqdq8er9nfkchdopav.png', 1, '133814250', '133814250@qq.com', '15303830571', '2016-04-16', 410172, '莲花街001号', 0, 1, '', '{\"name\": \"孟帅\", \"account\": \"15303830571\", \"payeeCode\": \"http://bufanyun.cn-bj.ufileos.com/hotgo/attachment/2023-02-09/cqdq8mqal5isvcb58g.jpg\"}', '2023-03-16 15:21:02', NULL, 1, '2021-02-12 17:59:45', '2023-03-16 15:21:01'),
(3, 100, 2, '测试账号', 'test', 'a7c588fffeb2c1d99b29879d7fe97c78', '6541561', '2c7db9eca4ed02a718e794ba4c904f56', '', '0.00', 'http://alioss.qvnidaye.com//images/2021/03/12/image_1615529198_vMK4kwq2.jpg', 1, '', 'c@qq.cc', '15303888888', '2016-04-13', 371100, '大潮街道666号', 1, 2, 'tr_1 ', NULL, NULL, '', 1, '2022-02-11 17:59:45', '2023-01-10 16:47:00'), (3, 100, 2, '测试账号', 'test', 'a7c588fffeb2c1d99b29879d7fe97c78', '6541561', '2c7db9eca4ed02a718e794ba4c904f56', '', '0.00', 'http://alioss.qvnidaye.com//images/2021/03/12/image_1615529198_vMK4kwq2.jpg', 1, '', 'c@qq.cc', '15303888888', '2016-04-13', 371100, '大潮街道666号', 1, 2, 'tr_1 ', NULL, NULL, '', 1, '2022-02-11 17:59:45', '2023-01-10 16:47:00'),
(8, 105, 206, 'ameng', 'ameng', '4501790a9b89f4e66f4417c899836511', 'hfuUEb', '0d796b377f77f1e1d42278eedbab6110', '', '0.00', '', 1, '', '', '', NULL, 0, '', 1, 2, 'tr_1 ', NULL, '2023-03-05 15:25:49', '', 1, '2023-02-03 17:34:31', '2023-02-26 00:31:13'); (8, 105, 206, 'ameng', 'ameng', '4501790a9b89f4e66f4417c899836511', 'hfuUEb', '0d796b377f77f1e1d42278eedbab6110', '', '0.00', '', 1, '', '', '', NULL, 0, '', 1, 2, 'tr_1 ', NULL, '2023-03-05 15:25:49', '', 1, '2023-02-03 17:34:31', '2023-02-26 00:31:13');
@ -177,10 +177,7 @@ CREATE TABLE `hg_admin_member_post` (
INSERT INTO `hg_admin_member_post` (`member_id`, `post_id`) VALUES INSERT INTO `hg_admin_member_post` (`member_id`, `post_id`) VALUES
(1, 1), (1, 1),
(3, 4), (3, 4),
(7, 3), (8, 2);
(7, 4),
(8, 2),
(9, 3);
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -5041,8 +5038,9 @@ CREATE TABLE `hg_sys_serve_license` (
`appid` varchar(64) NOT NULL COMMENT '应用ID', `appid` varchar(64) NOT NULL COMMENT '应用ID',
`secret_key` varchar(255) DEFAULT NULL COMMENT '应用秘钥', `secret_key` varchar(255) DEFAULT NULL COMMENT '应用秘钥',
`desc` text COMMENT '授权说明', `desc` text COMMENT '授权说明',
`remote_addr` varchar(64) DEFAULT NULL COMMENT '连接地址', `remote_addr` varchar(64) DEFAULT NULL COMMENT '最后连接地址',
`online` tinyint(4) DEFAULT '0' COMMENT '是否在线', `online` tinyint(4) DEFAULT '0' COMMENT '在线数量',
`online_limit` int(11) DEFAULT '1' COMMENT '在线数量限制默认1',
`login_times` bigint(20) DEFAULT NULL COMMENT '登录次数', `login_times` bigint(20) DEFAULT NULL COMMENT '登录次数',
`last_login_at` datetime DEFAULT NULL COMMENT '最后登录时间', `last_login_at` datetime DEFAULT NULL COMMENT '最后登录时间',
`last_active_at` datetime DEFAULT NULL COMMENT '最后活跃时间', `last_active_at` datetime DEFAULT NULL COMMENT '最后活跃时间',
@ -5059,10 +5057,10 @@ CREATE TABLE `hg_sys_serve_license` (
-- 转存表中的数据 `hg_sys_serve_license` -- 转存表中的数据 `hg_sys_serve_license`
-- --
INSERT INTO `hg_sys_serve_license` (`id`, `group`, `name`, `appid`, `secret_key`, `desc`, `remote_addr`, `online`, `login_times`, `last_login_at`, `last_active_at`, `routes`, `allowed_ips`, `end_at`, `remark`, `status`, `created_at`, `updated_at`) VALUES INSERT INTO `hg_sys_serve_license` (`id`, `group`, `name`, `appid`, `secret_key`, `desc`, `remote_addr`, `online`, `online_limit`, `login_times`, `last_login_at`, `last_active_at`, `routes`, `allowed_ips`, `end_at`, `remark`, `status`, `created_at`, `updated_at`) VALUES
(1, 'queue', '默认的消息队列', '1001', 'hotgo', '这是默认的消息队列TCP客户端授权凭证', NULL, 0, 1, '2023-03-23 00:00:00', NULL, NULL, '127.0.0.1', '2033-03-09 00:00:00', '', 1, '2023-03-11 00:00:00', '2023-03-05 00:00:00'), (1, 'queue', '默认的消息队列', '1001', 'hotgo', '这是默认的消息队列TCP客户端授权凭证', NULL, 0, 1, 1, '2023-03-23 00:00:00', NULL, NULL, '127.0.0.1', '2033-03-09 00:00:00', '', 1, '2023-03-11 00:00:00', '2023-03-05 00:00:00'),
(2, 'cron', '默认的定时任务', '1002', 'hotgo', '这是默认的定时任务TCP客户端授权凭证', NULL, 0, 1, '2023-03-23 00:00:00', NULL, NULL, '127.0.0.1', '2033-03-09 00:00:00', '', 1, '2023-03-11 00:00:00', '2023-03-05 00:00:00'), (2, 'cron', '默认的定时任务', '1002', 'hotgo', '这是默认的定时任务TCP客户端授权凭证', NULL, 0, 1, 1, '2023-03-23 00:00:00', NULL, NULL, '127.0.0.1', '2033-03-09 00:00:00', '', 1, '2023-03-11 00:00:00', '2023-03-05 00:00:00'),
(3, 'auth', '测试授权', 'mengshuai', '123456', '这是一个测试的授权服务可以为第三方平台提供授权支持', '127.0.0.1:54182', 1, 20, '2023-03-13 16:01:02', '2023-03-13 16:57:04', NULL, '127.0.0.1', '2033-03-09 00:00:00', '', 1, '2023-03-11 00:00:00', '2023-03-13 16:57:03'); (3, 'auth', '测试授权', 'mengshuai', '123456', '这是一个测试的授权服务可以为第三方平台提供授权支持', '127.0.0.1:54182', 1, 1, 20, '2023-03-13 16:01:02', '2023-03-13 17:15:04', NULL, '127.0.0.1', '2033-03-09 00:00:00', '', 1, '2023-03-11 00:00:00', '2023-03-13 17:15:03');
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -5387,13 +5385,13 @@ ALTER TABLE `hg_admin_dept`
-- 使用表AUTO_INCREMENT `hg_admin_member` -- 使用表AUTO_INCREMENT `hg_admin_member`
-- --
ALTER TABLE `hg_admin_member` ALTER TABLE `hg_admin_member`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '管理员ID', AUTO_INCREMENT=9; MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '管理员ID', AUTO_INCREMENT=10;
-- --
-- 使用表AUTO_INCREMENT `hg_admin_menu` -- 使用表AUTO_INCREMENT `hg_admin_menu`
-- --
ALTER TABLE `hg_admin_menu` ALTER TABLE `hg_admin_menu`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '菜单ID', AUTO_INCREMENT=2232; MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '菜单ID', AUTO_INCREMENT=2253;
-- --
-- 使用表AUTO_INCREMENT `hg_admin_notice` -- 使用表AUTO_INCREMENT `hg_admin_notice`
@ -5489,7 +5487,7 @@ ALTER TABLE `hg_sys_ems_log`
-- 使用表AUTO_INCREMENT `hg_sys_gen_codes` -- 使用表AUTO_INCREMENT `hg_sys_gen_codes`
-- --
ALTER TABLE `hg_sys_gen_codes` ALTER TABLE `hg_sys_gen_codes`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '生成ID', AUTO_INCREMENT=5; MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '生成ID', AUTO_INCREMENT=8;
-- --
-- 使用表AUTO_INCREMENT `hg_sys_gen_curd_demo` -- 使用表AUTO_INCREMENT `hg_sys_gen_curd_demo`

View File

@ -1,6 +1,6 @@
{ {
"name": "hotgo", "name": "hotgo",
"version": "2.4.2", "version": "2.4.4",
"author": { "author": {
"name": "MengShuai", "name": "MengShuai",
"email": "133814250@qq.com", "email": "133814250@qq.com",