Merge pull request #9 from bufanyun/v2.0

up
This commit is contained in:
maxbad 2023-05-15 10:53:44 +08:00 committed by GitHub
commit dfabb89217
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
124 changed files with 2949 additions and 2007 deletions

View File

@ -11,6 +11,11 @@
> 如果升级(覆盖)代码后打开会出现 sql 报错, 请检查更新的数据库格式或自行调整 > 如果升级(覆盖)代码后打开会出现 sql 报错, 请检查更新的数据库格式或自行调整
### v2.7.3
updated 2023.05.14
- 增加:增加注册、手机号登录、二维码邀请注册功能
- 优化:优化管理员业务模块验证唯一属性接口,将登录相关功能拆分到管理员基础模块中
- 移除移除web端mock插件
### v2.6.10 ### v2.6.10
updated 2023.05.12 updated 2023.05.12

View File

@ -189,7 +189,7 @@ func (s *sSysTable) Status(ctx context.Context, in sysin.TableStatusInp) (err er
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }

View File

@ -7,6 +7,7 @@ package common
import ( import (
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model"
"hotgo/internal/model/input/adminin" "hotgo/internal/model/input/adminin"
) )
@ -16,6 +17,15 @@ type LoginLogoutReq struct {
} }
type LoginLogoutRes struct{} type LoginLogoutRes struct{}
// RegisterReq 提交账号注册
type RegisterReq struct {
g.Meta `path:"/site/register" method:"post" tags:"后台基础" summary:"账号注册"`
adminin.RegisterInp
}
type RegisterRes struct {
*adminin.LoginModel
}
// LoginCaptchaReq 获取登录验证码 // LoginCaptchaReq 获取登录验证码
type LoginCaptchaReq struct { type LoginCaptchaReq struct {
g.Meta `path:"/site/captcha" method:"get" tags:"后台基础" summary:"获取登录验证码"` g.Meta `path:"/site/captcha" method:"get" tags:"后台基础" summary:"获取登录验证码"`
@ -25,17 +35,22 @@ type LoginCaptchaRes struct {
Base64 string `json:"base64" dc:"验证码"` Base64 string `json:"base64" dc:"验证码"`
} }
// LoginReq 提交登录 // AccountLoginReq 提交账号登录
type LoginReq struct { type AccountLoginReq struct {
g.Meta `path:"/site/login" method:"post" tags:"后台基础" summary:"账号登录"` g.Meta `path:"/site/accountLogin" method:"post" tags:"后台基础" summary:"账号登录"`
Username string `json:"username" v:"required#用户名不能为空" dc:"用户名"` adminin.AccountLoginInp
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
Cid string `json:"cid" dc:"验证码ID"`
Code string `json:"code" dc:"验证码"`
IsLock bool `json:"isLock" dc:"是否为锁屏状态"`
} }
type LoginRes struct { type AccountLoginRes struct {
*adminin.MemberLoginModel *adminin.LoginModel
}
// MobileLoginReq 提交手机号登录
type MobileLoginReq struct {
g.Meta `path:"/site/mobileLogin" method:"post" tags:"后台基础" summary:"手机号登录"`
adminin.MobileLoginInp
}
type MobileLoginRes struct {
*adminin.LoginModel
} }
// SiteConfigReq 获取配置 // SiteConfigReq 获取配置
@ -43,9 +58,18 @@ type SiteConfigReq struct {
g.Meta `path:"/site/config" method:"get" tags:"后台基础" summary:"获取配置"` g.Meta `path:"/site/config" method:"get" tags:"后台基础" summary:"获取配置"`
} }
type SiteConfigRes struct { type SiteConfigRes struct {
Version string `json:"version" dc:"系统版本"` Version string `json:"version" dc:"系统版本"`
WsAddr string `json:"wsAddr" dc:"客户端websocket地址"` WsAddr string `json:"wsAddr" dc:"客户端websocket地址"`
Domain string `json:"domain" dc:"对外域名"` Domain string `json:"domain" dc:"对外域名"`
//InviteUrl string `json:"inviteUrl" dc:"邀请注册地址"`
}
// SiteLoginConfigReq 获取登录配置
type SiteLoginConfigReq struct {
g.Meta `path:"/site/loginConfig" method:"get" tags:"后台基础" summary:"获取登录配置"`
}
type SiteLoginConfigRes struct {
*model.LoginConfig
} }
// SitePingReq ping // SitePingReq ping

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package common package common
import "github.com/gogf/gf/v2/frame/g" import "github.com/gogf/gf/v2/frame/g"
@ -24,3 +23,12 @@ type SendBindSmsReq struct {
} }
type SendBindSmsRes struct { type SendBindSmsRes struct {
} }
// SendSmsReq 发送短信
type SendSmsReq struct {
g.Meta `path:"/sms/send" tags:"短信" method:"post" summary:"发送短信"`
Event string `json:"event" v:"required#事件模板不能为空" dc:"事件模板"`
Mobile string `json:"mobile" v:"required#接收手机号不能为空" dc:"接收手机号"`
}
type SendSmsRes struct {
}

View File

@ -53,33 +53,6 @@ type ResetPwdReq struct {
} }
type ResetPwdRes struct{} type ResetPwdRes struct{}
// EmailUniqueReq 邮箱是否唯一
type EmailUniqueReq struct {
g.Meta `path:"/member/emailUnique" method:"get" tags:"用户" summary:"邮箱是否唯一"`
adminin.MemberEmailUniqueInp
}
type EmailUniqueRes struct {
*adminin.MemberEmailUniqueModel
}
// MobileUniqueReq 手机号是否唯一
type MobileUniqueReq struct {
g.Meta `path:"/member/mobileUnique" method:"get" tags:"用户" summary:"手机号是否唯一"`
adminin.MemberMobileUniqueInp
}
type MobileUniqueRes struct {
*adminin.MemberMobileUniqueModel
}
// NameUniqueReq 名称是否唯一
type NameUniqueReq struct {
g.Meta `path:"/member/nameUnique" method:"get" tags:"用户" summary:"用户名称是否唯一"`
adminin.MemberNameUniqueInp
}
type NameUniqueRes struct {
*adminin.MemberNameUniqueModel
}
// ListReq 查询列表 // ListReq 查询列表
type ListReq struct { type ListReq struct {
g.Meta `path:"/member/list" method:"get" tags:"用户" summary:"获取用户列表"` g.Meta `path:"/member/list" method:"get" tags:"用户" summary:"获取用户列表"`
@ -114,15 +87,6 @@ type DeleteReq struct {
} }
type DeleteRes struct{} type DeleteRes struct{}
// LoginInfoReq 获取登录用户信息
type LoginInfoReq struct {
g.Meta `path:"/member/info" method:"get" tags:"用户" summary:"获取登录用户信息" dc:"获取管理后台的登录用户信息"`
}
type LoginInfoRes struct {
*adminin.LoginMemberInfoModel
}
// StatusReq 更新用户状态 // StatusReq 更新用户状态
type StatusReq struct { type StatusReq struct {
g.Meta `path:"/member/status" method:"post" tags:"用户" summary:"更新用户状态"` g.Meta `path:"/member/status" method:"post" tags:"用户" summary:"更新用户状态"`
@ -132,10 +96,18 @@ type StatusRes struct{}
// SelectReq 获取可选的后台用户选项 // SelectReq 获取可选的后台用户选项
type SelectReq struct { type SelectReq struct {
g.Meta `path:"/member/option" method:"get" summary:"用户" tags:"获取可选的后台用户选项"` g.Meta `path:"/member/option" method:"get" tags:"用户" summary:"获取可选的后台用户选项"`
} }
type SelectRes []*adminin.MemberSelectModel type SelectRes []*adminin.MemberSelectModel
// InfoReq 获取登录用户信息
type InfoReq struct {
g.Meta `path:"/member/info" method:"get" tags:"用户" summary:"获取登录用户信息"`
}
type InfoRes struct {
*adminin.LoginMemberInfoModel
}
// AddBalanceReq 增加余额 // AddBalanceReq 增加余额
type AddBalanceReq struct { type AddBalanceReq struct {
g.Meta `path:"/member/addBalance" method:"post" tags:"用户" summary:"增加余额"` g.Meta `path:"/member/addBalance" method:"post" tags:"用户" summary:"增加余额"`

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package consts package consts
import "github.com/gogf/gf/v2/util/gconv" import "github.com/gogf/gf/v2/util/gconv"
@ -13,22 +12,25 @@ var RequestEncryptKey = []byte("f080a463654b2279")
// 配置数据类型 // 配置数据类型
const ( const (
ConfigTypeString = "string" ConfigTypeString = "string"
ConfigTypeInt = "int" ConfigTypeInt = "int"
ConfigTypeInt8 = "int8" ConfigTypeInt8 = "int8"
ConfigTypeInt16 = "int16" ConfigTypeInt16 = "int16"
ConfigTypeInt32 = "int32" ConfigTypeInt32 = "int32"
ConfigTypeInt64 = "int64" ConfigTypeInt64 = "int64"
ConfigTypeUint = "uint" ConfigTypeUint = "uint"
ConfigTypeUint8 = "uint8" ConfigTypeUint8 = "uint8"
ConfigTypeUint16 = "uint16" ConfigTypeUint16 = "uint16"
ConfigTypeUint32 = "uint32" ConfigTypeUint32 = "uint32"
ConfigTypeUint64 = "uint64" ConfigTypeUint64 = "uint64"
ConfigTypeFloat32 = "float32" ConfigTypeFloat32 = "float32"
ConfigTypeFloat64 = "float64" ConfigTypeFloat64 = "float64"
ConfigTypeBool = "bool" ConfigTypeBool = "bool"
ConfigTypeDate = "date" ConfigTypeDate = "date"
ConfigTypeDateTime = "datetime" ConfigTypeDateTime = "datetime"
ConfigTypeSliceString = "[]string"
ConfigTypeSliceInt = "[]int"
ConfigTypeSliceInt64 = "[]int64"
) )
var ConfigTypes = []string{ConfigTypeString, var ConfigTypes = []string{ConfigTypeString,
@ -37,6 +39,7 @@ var ConfigTypes = []string{ConfigTypeString,
ConfigTypeFloat32, ConfigTypeFloat64, ConfigTypeFloat32, ConfigTypeFloat64,
ConfigTypeBool, ConfigTypeBool,
ConfigTypeDate, ConfigTypeDateTime, ConfigTypeDate, ConfigTypeDateTime,
ConfigTypeSliceString, ConfigTypeSliceInt, ConfigTypeSliceInt64,
} }
// ConvType 类型转换 // ConvType 类型转换
@ -74,6 +77,12 @@ func ConvType(val interface{}, t string) interface{} {
val = gconv.Time(val, "Y-m-d") val = gconv.Time(val, "Y-m-d")
case ConfigTypeDateTime: case ConfigTypeDateTime:
val = gconv.Time(val, "Y-m-d H:i:s") val = gconv.Time(val, "Y-m-d H:i:s")
case ConfigTypeSliceInt:
val = gconv.SliceInt(val)
case ConfigTypeSliceInt64:
val = gconv.SliceInt64(val)
case ConfigTypeSliceString:
val = gconv.SliceStr(val)
default: default:
val = gconv.String(val) val = gconv.String(val)
} }

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package consts package consts
// 状态码 // 状态码
@ -14,4 +13,4 @@ const (
StatusDelete int = 3 // 已删除 StatusDelete int = 3 // 已删除
) )
var StatusMap = []int{StatusALL, StatusEnabled, StatusDisable, StatusDelete} var StatusSlice = []int{StatusALL, StatusEnabled, StatusDisable, StatusDelete}

View File

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

View File

@ -96,54 +96,15 @@ func (c *cMember) ResetPwd(ctx context.Context, req *member.ResetPwdReq) (res *m
return return
} }
// EmailUnique 邮箱是否唯一 // MemberInfo 登录用户信息
func (c *cMember) EmailUnique(ctx context.Context, req *member.EmailUniqueReq) (res *member.EmailUniqueRes, err error) { func (c *cMember) MemberInfo(ctx context.Context, _ *member.InfoReq) (res *member.InfoRes, err error) {
var in = adminin.MemberEmailUniqueInp{ data, err := service.AdminMember().LoginMemberInfo(ctx)
Id: req.Id,
Email: req.Email,
}
data, err := service.AdminMember().EmailUnique(ctx, in)
if err != nil { if err != nil {
return return
} }
res = new(member.EmailUniqueRes) res = new(member.InfoRes)
res.IsUnique = data.IsUnique res.LoginMemberInfoModel = data
return
}
// MobileUnique 手机号是否唯一
func (c *cMember) MobileUnique(ctx context.Context, req *member.MobileUniqueReq) (res *member.MobileUniqueRes, err error) {
var in = adminin.MemberMobileUniqueInp{
Id: req.Id,
Mobile: req.Mobile,
}
data, err := service.AdminMember().MobileUnique(ctx, in)
if err != nil {
return
}
res = new(member.MobileUniqueRes)
res.IsUnique = data.IsUnique
return
}
// NameUnique 名称是否唯一
func (c *cMember) NameUnique(ctx context.Context, req *member.NameUniqueReq) (res *member.NameUniqueRes, err error) {
var in = adminin.MemberNameUniqueInp{
Id: req.Id,
Username: req.Username,
}
data, err := service.AdminMember().NameUnique(ctx, in)
if err != nil {
return
}
res = new(member.NameUniqueRes)
res.IsUnique = data.IsUnique
return return
} }
@ -206,18 +167,6 @@ func (c *cMember) List(ctx context.Context, req *member.ListReq) (res *member.Li
return return
} }
// LoginInfo 登录用户信息
func (c *cMember) LoginInfo(ctx context.Context, req *member.LoginInfoReq) (res *member.LoginInfoRes, err error) {
data, err := service.AdminMember().LoginMemberInfo(ctx)
if err != nil {
return
}
res = new(member.LoginInfoRes)
res.LoginMemberInfoModel = data
return
}
// Status 更新状态 // Status 更新状态
func (c *cMember) Status(ctx context.Context, req *member.StatusReq) (res *member.StatusRes, err error) { func (c *cMember) Status(ctx context.Context, req *member.StatusReq) (res *member.StatusRes, err error) {
var in adminin.MemberStatusInp var in adminin.MemberStatusInp

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package admin package admin
import ( import (
@ -103,7 +102,7 @@ func (c *cRole) UpdatePermissions(ctx context.Context, req *role.UpdatePermissio
} }
// DataScopeSelect 获取数据权限选项 // DataScopeSelect 获取数据权限选项
func (c *cRole) DataScopeSelect(ctx context.Context, req *role.DataScopeSelectReq) (res *role.DataScopeSelectRes, err error) { func (c *cRole) DataScopeSelect(ctx context.Context, _ *role.DataScopeSelectReq) (res *role.DataScopeSelectRes, err error) {
data := service.AdminRole().DataScopeSelect(ctx) data := service.AdminRole().DataScopeSelect(ctx)
res = new(role.DataScopeSelectRes) res = new(role.DataScopeSelectRes)
res.List = data res.List = data

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package common package common
import ( import (
@ -16,7 +15,7 @@ var Console = cConsole{}
type cConsole struct{} type cConsole struct{}
// Stat 综合数据统计 // Stat 综合数据统计
func (c *cConsole) Stat(ctx context.Context, req *common.ConsoleStatReq) (res *common.ConsoleStatRes, err error) { func (c *cConsole) Stat(_ context.Context, _ *common.ConsoleStatReq) (res *common.ConsoleStatRes, err error) {
res = new(common.ConsoleStatRes) res = new(common.ConsoleStatRes)
res.Visits.DayVisits = 12010 res.Visits.DayVisits = 12010

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package common package common
import ( import (
@ -43,7 +42,7 @@ func (c *cEms) SendTest(ctx context.Context, req *common.SendTestEmailReq) (res
} }
// SendBindEms 发送换绑邮件 // SendBindEms 发送换绑邮件
func (c *cSms) SendBindEms(ctx context.Context, req *common.SendBindEmsReq) (res *common.SendBindEmsRes, err error) { func (c *cSms) SendBindEms(ctx context.Context, _ *common.SendBindEmsReq) (res *common.SendBindEmsRes, err error) {
var ( var (
memberId = contexts.GetUserId(ctx) memberId = contexts.GetUserId(ctx)
models *entity.AdminMember models *entity.AdminMember

View File

@ -16,7 +16,6 @@ import (
"hotgo/internal/library/captcha" "hotgo/internal/library/captcha"
"hotgo/internal/library/token" "hotgo/internal/library/token"
"hotgo/internal/model/input/adminin" "hotgo/internal/model/input/adminin"
"hotgo/internal/model/input/sysin"
"hotgo/internal/service" "hotgo/internal/service"
"hotgo/utility/validate" "hotgo/utility/validate"
) )
@ -26,12 +25,12 @@ var Site = cSite{}
type cSite struct{} type cSite struct{}
// Ping ping // Ping ping
func (c *cSite) Ping(ctx context.Context, req *common.SitePingReq) (res *common.SitePingRes, err error) { func (c *cSite) Ping(_ context.Context, _ *common.SitePingReq) (res *common.SitePingRes, err error) {
return return
} }
// Config 获取配置 // Config 获取配置
func (c *cSite) Config(ctx context.Context, req *common.SiteConfigReq) (res *common.SiteConfigRes, err error) { func (c *cSite) Config(ctx context.Context, _ *common.SiteConfigReq) (res *common.SiteConfigRes, err error) {
request := ghttp.RequestFromCtx(ctx) request := ghttp.RequestFromCtx(ctx)
res = &common.SiteConfigRes{ res = &common.SiteConfigRes{
Version: consts.VersionApp, Version: consts.VersionApp,
@ -71,35 +70,77 @@ func (c *cSite) getDomain(ctx context.Context, request *ghttp.Request) string {
return basic.Domain return basic.Domain
} }
// LoginConfig 登录配置
func (c *cSite) LoginConfig(ctx context.Context, _ *common.SiteLoginConfigReq) (res *common.SiteLoginConfigRes, err error) {
res = new(common.SiteLoginConfigRes)
login, err := service.SysConfig().GetLogin(ctx)
if err != nil {
return
}
res.LoginConfig = login
return
}
// Captcha 登录验证码 // Captcha 登录验证码
func (c *cSite) Captcha(ctx context.Context, req *common.LoginCaptchaReq) (res *common.LoginCaptchaRes, err error) { func (c *cSite) Captcha(ctx context.Context, _ *common.LoginCaptchaReq) (res *common.LoginCaptchaRes, err error) {
cid, base64 := captcha.Generate(ctx) cid, base64 := captcha.Generate(ctx)
res = &common.LoginCaptchaRes{Cid: cid, Base64: base64} res = &common.LoginCaptchaRes{Cid: cid, Base64: base64}
return return
} }
// Login 提交登录 // Register 账号注册
func (c *cSite) Login(ctx context.Context, req *common.LoginReq) (res *common.LoginRes, err error) { func (c *cSite) Register(ctx context.Context, req *common.RegisterReq) (res *common.RegisterRes, err error) {
var in adminin.MemberLoginInp var in adminin.RegisterInp
if err = gconv.Scan(req, &in); err != nil { if err = gconv.Scan(req, &in); err != nil {
return return
} }
defer func() { if err = validate.PreFilter(ctx, &in); err != nil {
var response = new(adminin.MemberLoginModel)
if res != nil && res.MemberLoginModel != nil {
response = res.MemberLoginModel
}
service.SysLoginLog().Push(ctx, sysin.LoginLogPushInp{Input: in, Response: response, Err: err})
}()
// 校验 验证码
if !req.IsLock && !captcha.Verify(req.Cid, req.Code) {
err = gerror.New("验证码错误")
return return
} }
model, err := service.AdminMember().Login(ctx, in) err = service.AdminSite().Register(ctx, in)
return
}
// AccountLogin 账号登录
func (c *cSite) AccountLogin(ctx context.Context, req *common.AccountLoginReq) (res *common.AccountLoginRes, err error) {
var in adminin.AccountLoginInp
if err = gconv.Scan(req, &in); err != nil {
return
}
login, err := service.SysConfig().GetLogin(ctx)
if err != nil {
return
}
if login.CaptchaSwitch == 1 {
// 校验 验证码
if !req.IsLock && !captcha.Verify(req.Cid, req.Code) {
err = gerror.New("验证码错误")
return
}
}
model, err := service.AdminSite().AccountLogin(ctx, in)
if err != nil {
return
}
err = gconv.Scan(model, &res)
return
}
// MobileLogin 手机号登录
func (c *cSite) MobileLogin(ctx context.Context, req *common.MobileLoginReq) (res *common.MobileLoginRes, err error) {
var in adminin.MobileLoginInp
if err = gconv.Scan(req, &in); err != nil {
return
}
model, err := service.AdminSite().MobileLogin(ctx, in)
if err != nil { if err != nil {
return return
} }
@ -109,7 +150,7 @@ func (c *cSite) Login(ctx context.Context, req *common.LoginReq) (res *common.Lo
} }
// Logout 注销登录 // Logout 注销登录
func (c *cSite) Logout(ctx context.Context, req *common.LoginLogoutReq) (res *common.LoginLogoutRes, err error) { func (c *cSite) Logout(ctx context.Context, _ *common.LoginLogoutReq) (res *common.LoginLogoutRes, err error) {
err = token.Logout(ghttp.RequestFromCtx(ctx)) err = token.Logout(ghttp.RequestFromCtx(ctx))
return return
} }

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package common package common
import ( import (
@ -40,7 +39,7 @@ func (c *cSms) SendTest(ctx context.Context, req *common.SendTestSmsReq) (res *c
} }
// SendBindSms 发送换绑短信 // SendBindSms 发送换绑短信
func (c *cSms) SendBindSms(ctx context.Context, req *common.SendBindSmsReq) (res *common.SendBindSmsRes, err error) { func (c *cSms) SendBindSms(ctx context.Context, _ *common.SendBindSmsReq) (res *common.SendBindSmsRes, err error) {
var ( var (
memberId = contexts.GetUserId(ctx) memberId = contexts.GetUserId(ctx)
models *entity.AdminMember models *entity.AdminMember
@ -75,3 +74,18 @@ func (c *cSms) SendBindSms(ctx context.Context, req *common.SendBindSmsReq) (res
}) })
return return
} }
// SendSms 发送短信
func (c *cSms) SendSms(ctx context.Context, req *common.SendSmsReq) (res *common.SendSmsRes, err error) {
var in sysin.SendCodeInp
if err = gconv.Scan(req, &in); err != nil {
return
}
if err = validate.PreFilter(ctx, &in); err != nil {
return
}
err = service.SysSmsLog().SendCode(ctx, in)
return
}

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package common package common
import ( import (
@ -19,7 +18,7 @@ var Upload = new(cUpload)
type cUpload struct{} type cUpload struct{}
// UploadImage 上传图片 // UploadImage 上传图片
func (c *cUpload) UploadImage(ctx context.Context, req *common.UploadImageReq) (res common.UploadImageRes, err error) { func (c *cUpload) UploadImage(ctx context.Context, _ *common.UploadImageReq) (res common.UploadImageRes, err error) {
file := g.RequestFromCtx(ctx).GetUploadFile("file") file := g.RequestFromCtx(ctx).GetUploadFile("file")
if file == nil { if file == nil {
err = gerror.New("没有找到上传的文件") err = gerror.New("没有找到上传的文件")
@ -30,7 +29,7 @@ func (c *cUpload) UploadImage(ctx context.Context, req *common.UploadImageReq) (
} }
// UploadFile 上传附件 // UploadFile 上传附件
func (c *cUpload) UploadFile(ctx context.Context, req *common.UploadFileReq) (res common.UploadFileRes, err error) { func (c *cUpload) UploadFile(ctx context.Context, _ *common.UploadFileReq) (res common.UploadFileRes, err error) {
file := g.RequestFromCtx(ctx).GetUploadFile("file") file := g.RequestFromCtx(ctx).GetUploadFile("file")
if file == nil { if file == nil {
err = gerror.New("没有找到上传的文件") err = gerror.New("没有找到上传的文件")

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package sys package sys
import ( import (
@ -46,7 +45,7 @@ func (c *cConfig) UpdateConfig(ctx context.Context, req *config.UpdateReq) (res
} }
// TypeSelect 数据类型选项 // TypeSelect 数据类型选项
func (c *cConfig) TypeSelect(ctx context.Context, req *config.TypeSelectReq) (res config.TypeSelectRes, err error) { func (c *cConfig) TypeSelect(_ context.Context, _ *config.TypeSelectReq) (res config.TypeSelectRes, err error) {
for _, v := range consts.ConfigTypes { for _, v := range consts.ConfigTypes {
res = append(res, form.Select{ res = append(res, form.Select{
Value: v, Value: v,
@ -58,7 +57,7 @@ func (c *cConfig) TypeSelect(ctx context.Context, req *config.TypeSelectReq) (re
} }
// GetCash 获取指定分组的配置 // GetCash 获取指定分组的配置
func (c *cConfig) GetCash(ctx context.Context, req *config.GetCashReq) (res *config.GetCashRes, err error) { func (c *cConfig) GetCash(ctx context.Context, _ *config.GetCashReq) (res *config.GetCashRes, err error) {
res = new(config.GetCashRes) res = new(config.GetCashRes)
res.GetConfigModel, err = service.SysConfig().GetConfigByGroup(ctx, sysin.GetConfigInp{Group: "cash"}) res.GetConfigModel, err = service.SysConfig().GetConfigByGroup(ctx, sysin.GetConfigInp{Group: "cash"})
return return

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package sys package sys
import ( import (
@ -99,7 +98,7 @@ func (c *cCronGroup) Status(ctx context.Context, req *cron.GroupStatusReq) (res
} }
// Select 选项 // Select 选项
func (c *cCronGroup) Select(ctx context.Context, req *cron.GroupSelectReq) (res *cron.GroupSelectRes, err error) { func (c *cCronGroup) Select(ctx context.Context, _ *cron.GroupSelectReq) (res *cron.GroupSelectRes, err error) {
data, err := service.SysCronGroup().Select(ctx, sysin.CronGroupSelectInp{}) data, err := service.SysCronGroup().Select(ctx, sysin.CronGroupSelectInp{})
if err != nil { if err != nil {
return return

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package sys package sys
import ( import (
@ -21,7 +20,7 @@ var (
type cDictType struct{} type cDictType struct{}
// Tree 树 // Tree 树
func (c *cDictType) Tree(ctx context.Context, req *dict.TypeTreeReq) (res *dict.TypeTreeRes, err error) { func (c *cDictType) Tree(ctx context.Context, _ *dict.TypeTreeReq) (res *dict.TypeTreeRes, err error) {
res = new(dict.TypeTreeRes) res = new(dict.TypeTreeRes)
res.List, err = service.SysDictType().Tree(ctx) res.List, err = service.SysDictType().Tree(ctx)
return return

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package sys package sys
import ( import (
@ -22,7 +21,7 @@ var Log = sLog{}
type sLog struct{} type sLog struct{}
// Clear 清空日志 // Clear 清空日志
func (c *sLog) Clear(ctx context.Context, req *log.ClearReq) (res *log.ClearRes, err error) { func (c *sLog) Clear(ctx context.Context, _ *log.ClearReq) (res *log.ClearRes, err error) {
err = gerror.New("暂时考虑到安全问题,请到数据库清空") err = gerror.New("暂时考虑到安全问题,请到数据库清空")
return return
} }

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package member package member
import ( import (
@ -18,7 +17,7 @@ var (
type cMember struct{} type cMember struct{}
func (c *cMember) GetIdByCode(ctx context.Context, req *member.GetIdByCodeReq) (res *member.GetIdByCodeRes, err error) { func (c *cMember) GetIdByCode(ctx context.Context, _ *member.GetIdByCodeReq) (res *member.GetIdByCodeRes, err error) {
g.RequestFromCtx(ctx).Response.Writeln("Hello World api member!") g.RequestFromCtx(ctx).Response.Writeln("Hello World api member!")
return return
} }

View File

@ -20,7 +20,7 @@ var (
type cNotify struct{} type cNotify struct{}
// AliPay 支付宝回调 // AliPay 支付宝回调
func (c *cNotify) AliPay(ctx context.Context, req *pay.NotifyAliPayReq) (res *pay.NotifyAliPayRes, err error) { func (c *cNotify) AliPay(ctx context.Context, _ *pay.NotifyAliPayReq) (res *pay.NotifyAliPayRes, err error) {
_, err = service.Pay().Notify(ctx, payin.PayNotifyInp{PayType: consts.PayTypeAliPay}) _, err = service.Pay().Notify(ctx, payin.PayNotifyInp{PayType: consts.PayTypeAliPay})
if err != nil { if err != nil {
return nil, err return nil, err
@ -30,7 +30,7 @@ func (c *cNotify) AliPay(ctx context.Context, req *pay.NotifyAliPayReq) (res *pa
} }
// WxPay 微信支付回调 // WxPay 微信支付回调
func (c *cNotify) WxPay(ctx context.Context, req *pay.NotifyWxPayReq) (res *pay.NotifyWxPayRes, err error) { func (c *cNotify) WxPay(ctx context.Context, _ *pay.NotifyWxPayReq) (res *pay.NotifyWxPayRes, err error) {
_, err = service.Pay().Notify(ctx, payin.PayNotifyInp{PayType: consts.PayTypeWxPay}) _, err = service.Pay().Notify(ctx, payin.PayNotifyInp{PayType: consts.PayTypeWxPay})
if err != nil { if err != nil {
return nil, err return nil, err
@ -42,7 +42,7 @@ func (c *cNotify) WxPay(ctx context.Context, req *pay.NotifyWxPayReq) (res *pay.
} }
// QQPay QQ支付回调 // QQPay QQ支付回调
func (c *cNotify) QQPay(ctx context.Context, req *pay.NotifyQQPayReq) (res *pay.NotifyQQPayRes, err error) { func (c *cNotify) QQPay(ctx context.Context, _ *pay.NotifyQQPayReq) (res *pay.NotifyQQPayRes, err error) {
_, err = service.Pay().Notify(ctx, payin.PayNotifyInp{PayType: consts.PayTypeQQPay}) _, err = service.Pay().Notify(ctx, payin.PayNotifyInp{PayType: consts.PayTypeQQPay})
if err != nil { if err != nil {
return nil, err return nil, err

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package user package user
import ( import (
@ -18,7 +17,7 @@ var (
type cHello struct{} type cHello struct{}
func (c *cHello) Hello(ctx context.Context, req *user.HelloReq) (res *user.HelloRes, err error) { func (c *cHello) Hello(ctx context.Context, _ *user.HelloReq) (res *user.HelloRes, err error) {
g.RequestFromCtx(ctx).Response.Writeln("Hello World api member!") g.RequestFromCtx(ctx).Response.Writeln("Hello World api member!")
return return
} }

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package base package base
import ( import (
@ -20,7 +19,7 @@ var Site = cSite{}
type cSite struct{} type cSite struct{}
func (a *cSite) Index(ctx context.Context, req *base.SiteIndexReq) (res *base.SiteIndexRes, err error) { func (a *cSite) Index(ctx context.Context, _ *base.SiteIndexReq) (res *base.SiteIndexRes, err error) {
service.View().Render(ctx, model.View{Data: g.Map{ service.View().Render(ctx, model.View{Data: g.Map{
"name": "HotGo", "name": "HotGo",
"version": consts.VersionApp, "version": consts.VersionApp,

View File

@ -5,11 +5,7 @@
package dao package dao
import ( import (
"context"
"github.com/gogf/gf/v2/errors/gerror"
"hotgo/internal/consts"
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
"hotgo/internal/model/entity"
) )
// internalAdminMemberDao is internal type for wrapping internal DAO implements. // internalAdminMemberDao is internal type for wrapping internal DAO implements.
@ -29,66 +25,3 @@ var (
) )
// Fill with you ideas below. // Fill with you ideas below.
// IsUniqueName 判断用户名是否唯一
func (dao *adminMemberDao) IsUniqueName(ctx context.Context, id int64, name string) (bool, error) {
var data *entity.AdminDept
m := dao.Ctx(ctx).Where("username", name)
if id > 0 {
m = m.WhereNot("id", id)
}
if err := m.Scan(&data); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return false, err
}
if data == nil {
return true, nil
}
return false, nil
}
// IsUniqueEmail 判断邮箱是否唯一
func (dao *adminMemberDao) IsUniqueEmail(ctx context.Context, id int64, email string) (bool, error) {
var data *entity.AdminMember
m := dao.Ctx(ctx).Where("email", email)
if id > 0 {
m = m.WhereNot("id", id)
}
if err := m.Scan(&data); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return false, err
}
if data == nil {
return true, nil
}
return false, nil
}
// IsUniqueMobile 判断手机号是否唯一
func (dao *adminMemberDao) IsUniqueMobile(ctx context.Context, id int64, mobile string) (bool, error) {
var data *entity.AdminMember
m := dao.Ctx(ctx).Where("mobile", mobile)
if id > 0 {
m = m.WhereNot("id", id)
}
if err := m.Scan(&data); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return false, err
}
if data == nil {
return true, nil
}
return false, nil
}

View File

@ -7,7 +7,6 @@ package dao
import ( import (
"context" "context"
"github.com/gogf/gf/v2/errors/gerror" "github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/dao/internal" "hotgo/internal/dao/internal"
"hotgo/internal/model/entity" "hotgo/internal/model/entity"
) )
@ -30,7 +29,6 @@ var (
// UpdatePostIds 更新管理员岗位 // UpdatePostIds 更新管理员岗位
func (dao *adminMemberPostDao) UpdatePostIds(ctx context.Context, memberId int64, postIds []int64) (err error) { func (dao *adminMemberPostDao) UpdatePostIds(ctx context.Context, memberId int64, postIds []int64) (err error) {
g.DumpWithType(postIds)
_, err = dao.Ctx(ctx). _, err = dao.Ctx(ctx).
Where("member_id", memberId). Where("member_id", memberId).
Delete() Delete()

View File

@ -41,6 +41,7 @@ type AdminMemberColumns struct {
Pid string // 上级管理员ID Pid string // 上级管理员ID
Level string // 关系树等级 Level string // 关系树等级
Tree string // 关系树 Tree string // 关系树
InviteCode string // 邀请码
Cash string // 提现配置 Cash string // 提现配置
LastActiveAt string // 最后活跃时间 LastActiveAt string // 最后活跃时间
Remark string // 备注 Remark string // 备注
@ -72,6 +73,7 @@ var adminMemberColumns = AdminMemberColumns{
Pid: "pid", Pid: "pid",
Level: "level", Level: "level",
Tree: "tree", Tree: "tree",
InviteCode: "invite_code",
Cash: "cash", Cash: "cash",
LastActiveAt: "last_active_at", LastActiveAt: "last_active_at",
Remark: "remark", Remark: "remark",

View File

@ -1,3 +1,8 @@
// Package handler
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package handler package handler
import ( import (

View File

@ -1,3 +1,8 @@
// Package handler
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package handler package handler
import ( import (

View File

@ -1,3 +1,8 @@
// Package hook
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package hook package hook
// hook. // hook.

View File

@ -1,3 +1,8 @@
// Package hook
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package hook package hook
import ( import (

View File

@ -1,3 +1,8 @@
// Package hook
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package hook package hook
import ( import (

View File

@ -1,3 +1,8 @@
// Package location
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package location package location
import ( import (

View File

@ -1,3 +1,8 @@
// Package location
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package location package location
import ( import (

View File

@ -1,3 +1,8 @@
// Package tcp
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package tcp package tcp
import ( import (

View File

@ -1,3 +1,8 @@
// Package tcp
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package tcp package tcp
import ( import (

View File

@ -1,3 +1,8 @@
// Package tcp
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package tcp package tcp
import ( import (

View File

@ -1,3 +1,8 @@
// Package tcp
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package tcp package tcp
import ( import (

View File

@ -1,3 +1,8 @@
// Package tcp
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package tcp package tcp
import ( import (

View File

@ -1,3 +1,8 @@
// Package tcp
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package tcp package tcp
type Response interface { type Response interface {

View File

@ -1,3 +1,8 @@
// Package tcp
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package tcp package tcp
import ( import (

View File

@ -1,3 +1,8 @@
// Package tcp
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package tcp package tcp
import ( import (

View File

@ -1,3 +1,8 @@
// Package tcp
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package tcp package tcp
import ( import (

View File

@ -1,3 +1,8 @@
// Package tcp
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package tcp package tcp
import ( import (

View File

@ -1,3 +1,8 @@
// Package tcp
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package tcp package tcp
import ( import (

View File

@ -1,3 +1,8 @@
// Package tcp
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package tcp package tcp
import ( import (

View File

@ -112,7 +112,7 @@ func (s *sAdminDept) Status(ctx context.Context, in adminin.DeptStatusInp) (err
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }

View File

@ -19,16 +19,13 @@ import (
"hotgo/internal/consts" "hotgo/internal/consts"
"hotgo/internal/dao" "hotgo/internal/dao"
"hotgo/internal/library/contexts" "hotgo/internal/library/contexts"
"hotgo/internal/library/hgorm"
"hotgo/internal/library/hgorm/handler" "hotgo/internal/library/hgorm/handler"
"hotgo/internal/library/hgorm/hook" "hotgo/internal/library/hgorm/hook"
"hotgo/internal/library/token"
"hotgo/internal/model"
"hotgo/internal/model/do"
"hotgo/internal/model/entity" "hotgo/internal/model/entity"
"hotgo/internal/model/input/adminin" "hotgo/internal/model/input/adminin"
"hotgo/internal/model/input/sysin" "hotgo/internal/model/input/sysin"
"hotgo/internal/service" "hotgo/internal/service"
"hotgo/utility/simple"
"hotgo/utility/tree" "hotgo/utility/tree"
"hotgo/utility/validate" "hotgo/utility/validate"
) )
@ -157,7 +154,7 @@ func (s *sAdminMember) UpdateCash(ctx context.Context, in adminin.MemberUpdateCa
_, err = dao.AdminMember.Ctx(ctx). _, err = dao.AdminMember.Ctx(ctx).
Where("id", memberId). Where("id", memberId).
Data(g.Map{ Data(g.Map{
"cash": adminin.MemberCash{ dao.AdminMember.Columns().Cash: adminin.MemberCash{
Name: in.Name, Name: in.Name,
Account: in.Account, Account: in.Account,
PayeeCode: in.PayeeCode, PayeeCode: in.PayeeCode,
@ -316,13 +313,13 @@ func (s *sAdminMember) UpdateProfile(ctx context.Context, in adminin.MemberUpdat
// UpdatePwd 修改登录密码 // UpdatePwd 修改登录密码
func (s *sAdminMember) UpdatePwd(ctx context.Context, in adminin.MemberUpdatePwdInp) (err error) { func (s *sAdminMember) UpdatePwd(ctx context.Context, in adminin.MemberUpdatePwdInp) (err error) {
var memberInfo entity.AdminMember var mb entity.AdminMember
if err = dao.AdminMember.Ctx(ctx).Where("id", in.Id).Scan(&memberInfo); err != nil { if err = dao.AdminMember.Ctx(ctx).Where("id", in.Id).Scan(&mb); err != nil {
err = gerror.Wrap(err, consts.ErrorORM) err = gerror.Wrap(err, consts.ErrorORM)
return err return err
} }
if gmd5.MustEncryptString(in.OldPassword+memberInfo.Salt) != memberInfo.PasswordHash { if gmd5.MustEncryptString(in.OldPassword+mb.Salt) != mb.PasswordHash {
err = gerror.New("原密码不正确") err = gerror.New("原密码不正确")
return err return err
} }
@ -330,10 +327,10 @@ func (s *sAdminMember) UpdatePwd(ctx context.Context, in adminin.MemberUpdatePwd
_, err = dao.AdminMember.Ctx(ctx). _, err = dao.AdminMember.Ctx(ctx).
Where("id", in.Id). Where("id", in.Id).
Data(g.Map{ Data(g.Map{
"password_hash": gmd5.MustEncryptString(in.NewPassword + memberInfo.Salt), dao.AdminMember.Columns().PasswordHash: gmd5.MustEncryptString(in.NewPassword + mb.Salt),
"updated_at": gtime.Now(),
}). }).
Update() Update()
if err != nil { if err != nil {
err = gerror.Wrap(err, consts.ErrorORM) err = gerror.Wrap(err, consts.ErrorORM)
return err return err
@ -362,61 +359,40 @@ func (s *sAdminMember) ResetPwd(ctx context.Context, in adminin.MemberResetPwdIn
_, err = s.FilterAuthModel(ctx, memberId). _, err = s.FilterAuthModel(ctx, memberId).
Where("id", in.Id). Where("id", in.Id).
Data(g.Map{ Data(g.Map{
"password_hash": gmd5.MustEncryptString(in.Password + mb.Salt), dao.AdminMember.Columns().PasswordHash: gmd5.MustEncryptString(in.Password + mb.Salt),
"updated_at": gtime.Now(),
}). }).
Update() Update()
return return
} }
// EmailUnique 菜单名称是否唯一 // VerifyUnique 验证管理员唯一属性
func (s *sAdminMember) EmailUnique(ctx context.Context, in adminin.MemberEmailUniqueInp) (res *adminin.MemberEmailUniqueModel, err error) { func (s *sAdminMember) VerifyUnique(ctx context.Context, in adminin.VerifyUniqueInp) (err error) {
isUnique, err := dao.AdminMember.IsUniqueEmail(ctx, in.Id, in.Email) if in.Where == nil {
if err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return return
} }
res = new(adminin.MemberEmailUniqueModel) msgMap := g.MapStrStr{
res.IsUnique = isUnique "username": "用户名已存在,请换一个",
return "email": "邮箱已存在,请换一个",
} "mobile": "手机号已存在,请换一个",
"invite_code": "邀请码已存在,请换一个",
// MobileUnique 手机号是否唯一
func (s *sAdminMember) MobileUnique(ctx context.Context, in adminin.MemberMobileUniqueInp) (res *adminin.MemberMobileUniqueModel, err error) {
isUnique, err := dao.AdminMember.IsUniqueMobile(ctx, in.Id, in.Mobile)
if err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
} }
res = new(adminin.MemberMobileUniqueModel) for k, v := range in.Where {
res.IsUnique = isUnique if v == "" {
return continue
} }
message, ok := msgMap[k]
// NameUnique 菜单名称是否唯一 if !ok {
func (s *sAdminMember) NameUnique(ctx context.Context, in adminin.MemberNameUniqueInp) (res *adminin.MemberNameUniqueModel, err error) { err = gerror.Newf("字段 [ %v ] 未配置唯一属性验证", k)
isUnique, err := dao.AdminMember.IsUniqueName(ctx, in.Id, in.Username) return
if err != nil { }
err = gerror.Wrap(err, consts.ErrorORM) if err = hgorm.IsUnique(ctx, dao.AdminMember, g.Map{k: v}, message, in.Id); err != nil {
return return
}
res = new(adminin.MemberNameUniqueModel)
res.IsUnique = isUnique
return
}
// VerifySuperId 验证是否为超管
func (s *sAdminMember) VerifySuperId(ctx context.Context, verifyId int64) bool {
superIds := g.Cfg().MustGet(ctx, "hotgo.admin.superIds")
for _, id := range superIds.Int64s() {
if id == verifyId {
return true
} }
} }
return false
return
} }
// Delete 删除 // Delete 删除
@ -449,37 +425,23 @@ func (s *sAdminMember) Edit(ctx context.Context, in adminin.MemberEditInp) (err
return return
} }
uniqueName, err := dao.AdminMember.IsUniqueName(ctx, in.Id, in.Username) err = s.VerifyUnique(ctx, adminin.VerifyUniqueInp{
Id: in.Id,
Where: g.Map{
dao.AdminMember.Columns().Username: in.Username,
dao.AdminMember.Columns().Mobile: in.Mobile,
dao.AdminMember.Columns().Email: in.Email,
},
})
if err != nil { if err != nil {
return return
} }
if !uniqueName {
err = gerror.New("用户名已存在") config, err := service.SysConfig().GetLogin(ctx)
if err != nil {
return return
} }
if in.Mobile != "" {
uniqueMobile, err := dao.AdminMember.IsUniqueMobile(ctx, in.Id, in.Mobile)
if err != nil {
return err
}
if !uniqueMobile {
err = gerror.New("手机号已存在")
return err
}
}
if in.Email != "" {
uniqueEmail, err := dao.AdminMember.IsUniqueEmail(ctx, in.Id, in.Email)
if err != nil {
return err
}
if !uniqueEmail {
err = gerror.New("邮箱已存在")
return err
}
}
// 修改 // 修改
if in.Id > 0 { if in.Id > 0 {
if s.VerifySuperId(ctx, in.Id) { if s.VerifySuperId(ctx, in.Id) {
@ -488,8 +450,13 @@ func (s *sAdminMember) Edit(ctx context.Context, in adminin.MemberEditInp) (err
} }
mod := s.FilterAuthModel(ctx, opMemberId) mod := s.FilterAuthModel(ctx, opMemberId)
if in.Password != "" { if in.Password != "" {
salt, err := s.FilterAuthModel(ctx, contexts.GetUserId(ctx)).Fields(dao.AdminMember.Columns().Salt).Where("id", in.Id).Value() // 修改密码
salt, err := s.FilterAuthModel(ctx, contexts.GetUserId(ctx)).
Fields(dao.AdminMember.Columns().Salt).
Where("id", in.Id).
Value()
if err != nil { if err != nil {
return err return err
} }
@ -498,35 +465,52 @@ func (s *sAdminMember) Edit(ctx context.Context, in adminin.MemberEditInp) (err
mod = mod.FieldsEx(dao.AdminMember.Columns().PasswordHash) mod = mod.FieldsEx(dao.AdminMember.Columns().PasswordHash)
} }
if _, err = mod.Where("id", in.Id).Data(in).Update(); err != nil { return g.DB().Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) {
return if _, err = mod.Where("id", in.Id).Data(in).Update(); err != nil {
} err = gerror.Wrap(err, consts.ErrorORM)
return
}
// 更新岗位 // 更新岗位
err = dao.AdminMemberPost.UpdatePostIds(ctx, in.Id, in.PostIds) if err = dao.AdminMemberPost.UpdatePostIds(ctx, in.Id, in.PostIds); err != nil {
return err = gerror.Wrap(err, consts.ErrorORM)
}
return
})
} }
// 新增用户时的额外属性 // 新增用户时的额外属性
var data adminin.MemberAddInp var data adminin.MemberAddInp
data.MemberEditInp = in
data.Salt = grand.S(6) data.Salt = grand.S(6)
data.InviteCode = grand.S(12)
data.PasswordHash = gmd5.MustEncryptString(data.Password + data.Salt) data.PasswordHash = gmd5.MustEncryptString(data.Password + data.Salt)
// 关系树 // 关系树
data.Pid = opMemberId data.Pid = opMemberId
data.Level, data.Tree, err = s.genTree(ctx, opMemberId) data.Level, data.Tree, err = s.GenTree(ctx, opMemberId)
if err != nil { if err != nil {
return return
} }
id, err := dao.AdminMember.Ctx(ctx).Data(data).InsertAndGetId() // 默认头像
if err != nil { if in.Avatar == "" {
return in.Avatar = config.Avatar
} }
data.MemberEditInp = in
err = dao.AdminMemberPost.UpdatePostIds(ctx, id, in.PostIds) return g.DB().Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) {
return id, err := dao.AdminMember.Ctx(ctx).Data(data).InsertAndGetId()
if err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
}
// 更新岗位
if err = dao.AdminMemberPost.UpdatePostIds(ctx, id, in.PostIds); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
}
return
})
} }
// View 获取信息 // View 获取信息
@ -589,6 +573,7 @@ func (s *sAdminMember) List(ctx context.Context, in adminin.MemberListInp) (list
Fields("post_id"). Fields("post_id").
Where("member_id", list[i].Id). Where("member_id", list[i].Id).
Array() Array()
if err != nil { if err != nil {
return nil, 0, err return nil, 0, err
} }
@ -601,20 +586,68 @@ func (s *sAdminMember) List(ctx context.Context, in adminin.MemberListInp) (list
return return
} }
// genTree 生成关系树 // Status 更新状态
func (s *sAdminMember) genTree(ctx context.Context, pid int64) (level int, newTree string, err error) { func (s *sAdminMember) Status(ctx context.Context, in adminin.MemberStatusInp) (err error) {
var pInfo *entity.AdminMember if in.Id <= 0 {
if err = dao.AdminMember.Ctx(ctx).Where("id", pid).Scan(&pInfo); err != nil { err = gerror.New("ID不能为空")
return return
} }
if pInfo == nil { if s.VerifySuperId(ctx, in.Id) {
err = gerror.New("超管账号不能更改状态")
return
}
if in.Status <= 0 {
err = gerror.New("状态不能为空")
return
}
if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确")
return
}
// 修改
in.UpdatedAt = gtime.Now()
_, err = s.FilterAuthModel(ctx, contexts.GetUserId(ctx)).Where("id", in.Id).Data("status", in.Status).Update()
return
}
// GenTree 生成关系树
func (s *sAdminMember) GenTree(ctx context.Context, pid int64) (level int, newTree string, err error) {
var pmb *entity.AdminMember
if err = dao.AdminMember.Ctx(ctx).Where("id", pid).Scan(&pmb); err != nil {
return
}
if pmb == nil {
err = gerror.New("上级信息不存在") err = gerror.New("上级信息不存在")
return return
} }
level = pInfo.Level + 1 level = pmb.Level + 1
newTree = tree.GenLabel(pInfo.Tree, pInfo.Id) newTree = tree.GenLabel(pmb.Tree, pmb.Id)
return
}
// RoleMemberList 获取角色下的用户列表
func (s *sAdminMember) RoleMemberList(ctx context.Context, in adminin.RoleMemberListInp) (list []*adminin.MemberListModel, totalCount int, err error) {
mod := dao.AdminMember.Ctx(ctx)
if in.Role > 0 {
mod = mod.Where("role", in.Role)
}
totalCount, err = mod.Count()
if err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
}
if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
}
return return
} }
@ -626,11 +659,7 @@ func (s *sAdminMember) LoginMemberInfo(ctx context.Context) (res *adminin.LoginM
return return
} }
err = dao.AdminMember.Ctx(ctx). if err = dao.AdminMember.Ctx(ctx).Hook(hook.MemberInfo).Where("id", memberId).Scan(&res); err != nil {
Hook(hook.MemberInfo).
Where("id", memberId).
Scan(&res)
if err != nil {
err = gerror.Wrap(err, consts.ErrorORM) err = gerror.Wrap(err, consts.ErrorORM)
return return
} }
@ -660,142 +689,36 @@ func (s *sAdminMember) LoginMemberInfo(ctx context.Context) (res *adminin.LoginM
return return
} }
// Login 提交登录 // MemberLoginStat 用户登录统计
func (s *sAdminMember) Login(ctx context.Context, in adminin.MemberLoginInp) (res *adminin.MemberLoginModel, err error) { func (s *sAdminMember) MemberLoginStat(ctx context.Context, in adminin.MemberLoginStatInp) (res *adminin.MemberLoginStatModel, err error) {
var ( var models *entity.SysLoginLog
ro *entity.AdminRole err = dao.SysLoginLog.Ctx(ctx).
mb *entity.AdminMember Fields("login_at,login_ip").
) Where("member_id", in.MemberId).
Where("status", consts.StatusEnabled).
Scan(&models)
if err = dao.AdminMember.Ctx(ctx).Where("username", in.Username).Scan(&mb); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
}
if mb == nil {
err = gerror.New("账号不存在")
return
}
if mb.Salt == "" {
err = gerror.New("用户信息错误")
return
}
if err = simple.CheckPassword(in.Password, mb.Salt, mb.PasswordHash); err != nil {
return
}
if mb.Status != consts.StatusEnabled {
err = gerror.New("账号已被禁用")
return
}
if err = dao.AdminRole.Ctx(ctx).Fields("id,key,status").Where("id", mb.RoleId).Scan(&ro); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
}
if ro == nil {
err = gerror.New("角色不存在")
return
}
if ro.Status != consts.StatusEnabled {
err = gerror.New("角色已被禁用")
return
}
user := &model.Identity{
Id: mb.Id,
Pid: mb.Pid,
DeptId: mb.DeptId,
RoleId: ro.Id,
RoleKey: ro.Key,
Username: mb.Username,
RealName: mb.RealName,
Avatar: mb.Avatar,
Email: mb.Email,
Mobile: mb.Mobile,
App: consts.AppAdmin,
LoginAt: gtime.Now(),
}
loginToken, expires, err := token.Login(ctx, user)
if err != nil { if err != nil {
return nil, err
}
update := do.AdminMember{
LastActiveAt: user.LoginAt,
}
// 更新登录信息
if _, err = dao.AdminMember.Ctx(ctx).Data(update).Where(do.AdminMember{Id: mb.Id}).Update(); err != nil {
return return
} }
res = &adminin.MemberLoginModel{ res = new(adminin.MemberLoginStatModel)
Id: user.Id, if models == nil {
Token: loginToken,
Expires: expires,
}
return
}
// RoleMemberList 获取角色下的用户列表
func (s *sAdminMember) RoleMemberList(ctx context.Context, in adminin.RoleMemberListInp) (list []*adminin.MemberListModel, totalCount int, err error) {
mod := dao.AdminMember.Ctx(ctx)
if in.Role > 0 {
mod = mod.Where("role", in.Role)
}
totalCount, err = mod.Count()
if err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return return
} }
if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil { res.LastLoginAt = models.LoginAt
err = gerror.Wrap(err, consts.ErrorORM) res.LastLoginIp = models.LoginIp
return res.LoginCount, err = dao.SysLoginLog.Ctx(ctx).
} Where("member_id", in.MemberId).
Where("status", consts.StatusEnabled).
return Count()
}
// Status 更新状态
func (s *sAdminMember) Status(ctx context.Context, in adminin.MemberStatusInp) (err error) {
if in.Id <= 0 {
err = gerror.New("ID不能为空")
return
}
if s.VerifySuperId(ctx, in.Id) {
err = gerror.New("超管账号不能更改状态")
return
}
if in.Status <= 0 {
err = gerror.New("状态不能为空")
return
}
if !validate.InSliceInt(consts.StatusMap, in.Status) {
err = gerror.New("状态不正确")
return
}
// 修改
in.UpdatedAt = gtime.Now()
_, err = s.FilterAuthModel(ctx, contexts.GetUserId(ctx)).Where("id", in.Id).Data("status", in.Status).Update()
return return
} }
// GetIdByCode 通过邀请码获取用户ID // GetIdByCode 通过邀请码获取用户ID
func (s *sAdminMember) GetIdByCode(ctx context.Context, in adminin.GetIdByCodeInp) (res *adminin.GetIdByCodeModel, err error) { func (s *sAdminMember) GetIdByCode(ctx context.Context, in adminin.GetIdByCodeInp) (res *adminin.GetIdByCodeModel, err error) {
err = dao.AdminMember.Ctx(ctx).Fields("invite_code").Where("invite_code", in.Code).Scan(&res) err = dao.AdminMember.Ctx(ctx).Fields(adminin.GetIdByCodeModel{}).Where("invite_code", in.Code).Scan(&res)
return return
} }
@ -808,6 +731,17 @@ func (s *sAdminMember) Select(ctx context.Context, in adminin.MemberSelectInp) (
return return
} }
// VerifySuperId 验证是否为超管
func (s *sAdminMember) VerifySuperId(ctx context.Context, verifyId int64) bool {
superIds := g.Cfg().MustGet(ctx, "hotgo.admin.superIds")
for _, id := range superIds.Int64s() {
if id == verifyId {
return true
}
}
return false
}
func (s *sAdminMember) FilterAuthModel(ctx context.Context, memberId int64) *gdb.Model { func (s *sAdminMember) FilterAuthModel(ctx context.Context, memberId int64) *gdb.Model {
m := dao.AdminMember.Ctx(ctx) m := dao.AdminMember.Ctx(ctx)
if !s.VerifySuperId(ctx, memberId) { if !s.VerifySuperId(ctx, memberId) {
@ -815,26 +749,3 @@ func (s *sAdminMember) FilterAuthModel(ctx context.Context, memberId int64) *gdb
} }
return m.Handler(handler.FilterAuthWithField("id")) return m.Handler(handler.FilterAuthWithField("id"))
} }
// MemberLoginStat 用户登录统计
func (s *sAdminMember) MemberLoginStat(ctx context.Context, in adminin.MemberLoginStatInp) (res *adminin.MemberLoginStatModel, err error) {
var models *entity.SysLoginLog
err = dao.SysLoginLog.Ctx(ctx).
Fields("login_at,login_ip").
Where("member_id", in.MemberId).
Where("status", consts.StatusEnabled).
Scan(&models)
if err != nil {
return
}
res = new(adminin.MemberLoginStatModel)
if models == nil {
return
}
res.LastLoginAt = models.LoginAt
res.LastLoginIp = models.LoginIp
res.LoginCount, err = dao.SysLoginLog.Ctx(ctx).Where("member_id", in.MemberId).Where("status", consts.StatusEnabled).Count()
return
}

View File

@ -124,7 +124,7 @@ func (s *sAdminNotice) Status(ctx context.Context, in adminin.NoticeStatusInp) (
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }

View File

@ -378,7 +378,7 @@ func (s *sAdminOrder) Status(ctx context.Context, in adminin.OrderStatusInp) (er
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }

View File

@ -203,7 +203,7 @@ func (s *sAdminPost) Status(ctx context.Context, in adminin.PostStatusInp) (err
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }

View File

@ -0,0 +1,276 @@
package admin
import (
"context"
"github.com/gogf/gf/v2/crypto/gmd5"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/util/grand"
"hotgo/internal/consts"
"hotgo/internal/dao"
"hotgo/internal/library/token"
"hotgo/internal/model"
"hotgo/internal/model/do"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/adminin"
"hotgo/internal/model/input/sysin"
"hotgo/internal/service"
"hotgo/utility/simple"
)
type sAdminSite struct{}
func NewAdminSite() *sAdminSite {
return &sAdminSite{}
}
func init() {
service.RegisterAdminSite(NewAdminSite())
}
// Register 账号注册
func (s *sAdminSite) Register(ctx context.Context, in adminin.RegisterInp) (err error) {
config, err := service.SysConfig().GetLogin(ctx)
if err != nil {
return
}
if config.ForceInvite == 1 && in.InviteCode == "" {
err = gerror.New("请填写邀请码")
return
}
var data adminin.MemberAddInp
// 默认上级
data.Pid = 1
// 存在邀请人
if in.InviteCode != "" {
pmb, err := service.AdminMember().GetIdByCode(ctx, adminin.GetIdByCodeInp{Code: in.InviteCode})
if err != nil {
return err
}
if pmb == nil {
err = gerror.New("邀请人信息不存在")
return err
}
data.Pid = pmb.Id
}
if config.RegisterSwitch != 1 {
err = gerror.New("管理员未开放注册")
return
}
if config.RoleId < 1 {
err = gerror.New("管理员未配置默认角色")
return
}
if config.DeptId < 1 {
err = gerror.New("管理员未配置默认部门")
return
}
if len(config.PostIds) == 0 {
err = gerror.New("管理员未配置默认岗位")
return
}
// 验证唯一性
err = service.AdminMember().VerifyUnique(ctx, adminin.VerifyUniqueInp{
Where: g.Map{
dao.AdminMember.Columns().Username: in.Username,
dao.AdminMember.Columns().Mobile: in.Mobile,
},
})
if err != nil {
return
}
// 验证短信验证码
err = service.SysSmsLog().VerifyCode(ctx, sysin.VerifyCodeInp{
Event: consts.SmsTemplateRegister,
Mobile: in.Mobile,
Code: in.Code,
})
if err != nil {
return
}
data.MemberEditInp = adminin.MemberEditInp{
Id: 0,
RoleId: config.RoleId,
PostIds: config.PostIds,
DeptId: config.DeptId,
Username: in.Username,
Password: in.Password,
RealName: "",
Avatar: config.Avatar,
Sex: 3, // 保密
Mobile: in.Mobile,
Status: consts.StatusEnabled,
}
data.Salt = grand.S(6)
data.InviteCode = grand.S(12)
data.PasswordHash = gmd5.MustEncryptString(data.Password + data.Salt)
data.Level, data.Tree, err = service.AdminMember().GenTree(ctx, data.Pid)
if err != nil {
return
}
// 提交注册信息
return g.DB().Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) {
id, err := dao.AdminMember.Ctx(ctx).Data(data).InsertAndGetId()
if err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
}
// 更新岗位
if err = dao.AdminMemberPost.UpdatePostIds(ctx, id, config.PostIds); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
}
return
})
}
// AccountLogin 账号登录
func (s *sAdminSite) AccountLogin(ctx context.Context, in adminin.AccountLoginInp) (res *adminin.LoginModel, err error) {
defer func() {
service.SysLoginLog().Push(ctx, sysin.LoginLogPushInp{Response: res, Err: err})
}()
var mb *entity.AdminMember
if err = dao.AdminMember.Ctx(ctx).Where("username", in.Username).Scan(&mb); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
}
if mb == nil {
err = gerror.New("账号不存在")
return
}
res = new(adminin.LoginModel)
res.Id = mb.Id
res.Username = mb.Username
if mb.Salt == "" {
err = gerror.New("用户信息错误")
return
}
if err = simple.CheckPassword(in.Password, mb.Salt, mb.PasswordHash); err != nil {
return
}
if mb.Status != consts.StatusEnabled {
err = gerror.New("账号已被禁用")
return
}
res, err = s.handleLogin(ctx, mb)
return
}
// MobileLogin 手机号登录
func (s *sAdminSite) MobileLogin(ctx context.Context, in adminin.MobileLoginInp) (res *adminin.LoginModel, err error) {
defer func() {
service.SysLoginLog().Push(ctx, sysin.LoginLogPushInp{Response: res, Err: err})
}()
var mb *entity.AdminMember
if err = dao.AdminMember.Ctx(ctx).Where("mobile ", in.Mobile).Scan(&mb); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
}
if mb == nil {
err = gerror.New("账号不存在")
return
}
res = new(adminin.LoginModel)
res.Id = mb.Id
res.Username = mb.Username
err = service.SysSmsLog().VerifyCode(ctx, sysin.VerifyCodeInp{
Event: consts.SmsTemplateLogin,
Mobile: in.Mobile,
Code: in.Code,
})
if err != nil {
return
}
if mb.Status != consts.StatusEnabled {
err = gerror.New("账号已被禁用")
return
}
res, err = s.handleLogin(ctx, mb)
return
}
// handleLogin .
func (s *sAdminSite) handleLogin(ctx context.Context, mb *entity.AdminMember) (res *adminin.LoginModel, err error) {
var ro *entity.AdminRole
if err = dao.AdminRole.Ctx(ctx).Fields("id,key,status").Where("id", mb.RoleId).Scan(&ro); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
}
if ro == nil {
err = gerror.New("角色不存在")
return
}
if ro.Status != consts.StatusEnabled {
err = gerror.New("角色已被禁用")
return
}
user := &model.Identity{
Id: mb.Id,
Pid: mb.Pid,
DeptId: mb.DeptId,
RoleId: ro.Id,
RoleKey: ro.Key,
Username: mb.Username,
RealName: mb.RealName,
Avatar: mb.Avatar,
Email: mb.Email,
Mobile: mb.Mobile,
App: consts.AppAdmin,
LoginAt: gtime.Now(),
}
loginToken, expires, err := token.Login(ctx, user)
if err != nil {
return nil, err
}
update := do.AdminMember{
LastActiveAt: user.LoginAt,
}
// 更新登录信息
if _, err = dao.AdminMember.Ctx(ctx).Data(update).Where(do.AdminMember{Id: mb.Id}).Update(); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
}
res = &adminin.LoginModel{
Username: user.Username,
Id: user.Id,
Token: loginToken,
Expires: expires,
}
return
}

View File

@ -39,8 +39,9 @@ func NewMiddleware() *sMiddleware {
return &sMiddleware{ return &sMiddleware{
LoginUrl: "/common", LoginUrl: "/common",
DemoWhiteList: g.Map{ DemoWhiteList: g.Map{
"/admin/site/login": struct{}{}, // 后台登录 "/admin/site/accountLogin": struct{}{}, // 账号登录
"/admin/genCodes/preview": struct{}{}, // 预览代码 "/admin/site/mobileLogin": struct{}{}, // 手机号登录
"/admin/genCodes/preview": struct{}{}, // 预览代码
}, },
PayNotifyRoutes: g.Map{ PayNotifyRoutes: g.Map{
"/api/pay/notify/alipay": struct{}{}, // 支付宝 "/api/pay/notify/alipay": struct{}{}, // 支付宝

View File

@ -61,11 +61,6 @@ func (s *sPay) List(ctx context.Context, in payin.PayListInp) (list []*payin.Pay
mod = mod.WhereBetween(dao.PayLog.Columns().CreatedAt, in.CreatedAt[0], in.CreatedAt[1]) mod = mod.WhereBetween(dao.PayLog.Columns().CreatedAt, in.CreatedAt[0], in.CreatedAt[1])
} }
// 查询分类名称
if in.TestCategoryName != "" {
mod = mod.WhereLike(dao.TestCategory.Columns().Name, in.TestCategoryName)
}
totalCount, err = mod.Clone().Count() totalCount, err = mod.Clone().Count()
if err != nil { if err != nil {
return return
@ -143,7 +138,7 @@ func (s *sPay) Status(ctx context.Context, in payin.PayStatusInp) (err error) {
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }

View File

@ -73,7 +73,7 @@ func (s *sSysAttachment) Status(ctx context.Context, in sysin.AttachmentStatusIn
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }

View File

@ -68,7 +68,7 @@ func (s *sSysBlacklist) Status(ctx context.Context, in sysin.BlacklistStatusInp)
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }

View File

@ -83,27 +83,13 @@ func (s *sSysConfig) InitConfig(ctx context.Context) {
} }
// GetLoadTCP 获取本地tcp配置 // GetLogin 获取登录配置
func (s *sSysConfig) GetLoadTCP(ctx context.Context) (conf *model.TCPConfig, err error) { func (s *sSysConfig) GetLogin(ctx context.Context) (conf *model.LoginConfig, err error) {
err = g.Cfg().MustGet(ctx, "tcp").Scan(&conf) models, err := s.GetConfigByGroup(ctx, sysin.GetConfigInp{Group: "login"})
return if err != nil {
} return
}
// GetLoadCache 获取本地缓存配置 err = gconv.Scan(models.List, &conf)
func (s *sSysConfig) GetLoadCache(ctx context.Context) (conf *model.CacheConfig, err error) {
err = g.Cfg().MustGet(ctx, "cache").Scan(&conf)
return
}
// GetLoadGenerate 获取本地生成配置
func (s *sSysConfig) GetLoadGenerate(ctx context.Context) (conf *model.GenerateConfig, err error) {
err = g.Cfg().MustGet(ctx, "hggen").Scan(&conf)
return
}
// GetLoadToken 获取本地token配置
func (s *sSysConfig) GetLoadToken(ctx context.Context) (conf *model.TokenConfig, err error) {
err = g.Cfg().MustGet(ctx, "token").Scan(&conf)
return return
} }
@ -182,6 +168,30 @@ func (s *sSysConfig) GetBasic(ctx context.Context) (conf *model.BasicConfig, err
return return
} }
// GetLoadTCP 获取本地tcp配置
func (s *sSysConfig) GetLoadTCP(ctx context.Context) (conf *model.TCPConfig, err error) {
err = g.Cfg().MustGet(ctx, "tcp").Scan(&conf)
return
}
// GetLoadCache 获取本地缓存配置
func (s *sSysConfig) GetLoadCache(ctx context.Context) (conf *model.CacheConfig, err error) {
err = g.Cfg().MustGet(ctx, "cache").Scan(&conf)
return
}
// GetLoadGenerate 获取本地生成配置
func (s *sSysConfig) GetLoadGenerate(ctx context.Context) (conf *model.GenerateConfig, err error) {
err = g.Cfg().MustGet(ctx, "hggen").Scan(&conf)
return
}
// GetLoadToken 获取本地token配置
func (s *sSysConfig) GetLoadToken(ctx context.Context) (conf *model.TokenConfig, err error) {
err = g.Cfg().MustGet(ctx, "token").Scan(&conf)
return
}
// GetLoadSSL 获取本地日志配置 // GetLoadSSL 获取本地日志配置
func (s *sSysConfig) GetLoadSSL(ctx context.Context) (conf *model.SSLConfig, err error) { func (s *sSysConfig) GetLoadSSL(ctx context.Context) (conf *model.SSLConfig, err error) {
err = g.Cfg().MustGet(ctx, "hotgo.ssl").Scan(&conf) err = g.Cfg().MustGet(ctx, "hotgo.ssl").Scan(&conf)

View File

@ -107,7 +107,7 @@ func (s *sSysCron) Status(ctx context.Context, in sysin.CronStatusInp) (err erro
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }

View File

@ -63,7 +63,7 @@ func (s *sSysCronGroup) Status(ctx context.Context, in sysin.CronGroupStatusInp)
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }

View File

@ -180,7 +180,7 @@ func (s *sSysCurdDemo) Status(ctx context.Context, in sysin.CurdDemoStatusInp) (
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }

View File

@ -76,7 +76,7 @@ func (s *sSysEmsLog) Status(ctx context.Context, in sysin.EmsLogStatusInp) (err
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }

View File

@ -110,7 +110,7 @@ func (s *sSysGenCodes) Status(ctx context.Context, in sysin.GenCodesStatusInp) (
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }

View File

@ -24,6 +24,7 @@ import (
"hotgo/internal/library/location" "hotgo/internal/library/location"
"hotgo/internal/library/queue" "hotgo/internal/library/queue"
"hotgo/internal/model/entity" "hotgo/internal/model/entity"
"hotgo/internal/model/input/adminin"
"hotgo/internal/model/input/form" "hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin" "hotgo/internal/model/input/sysin"
"hotgo/internal/service" "hotgo/internal/service"
@ -147,10 +148,13 @@ func (s *sSysLoginLog) View(ctx context.Context, in sysin.LoginLogViewInp) (res
// Push 推送登录日志 // Push 推送登录日志
func (s *sSysLoginLog) Push(ctx context.Context, in sysin.LoginLogPushInp) { func (s *sSysLoginLog) Push(ctx context.Context, in sysin.LoginLogPushInp) {
if in.Response == nil {
in.Response = new(adminin.LoginModel)
}
var models entity.SysLoginLog var models entity.SysLoginLog
models.ReqId = gctx.CtxId(ctx) models.ReqId = gctx.CtxId(ctx)
models.MemberId = in.Response.Id models.MemberId = in.Response.Id
models.Username = in.Input.Username models.Username = in.Response.Username
models.LoginAt = gtime.Now() models.LoginAt = gtime.Now()
models.LoginIp = location.GetClientIp(ghttp.RequestFromCtx(ctx)) models.LoginIp = location.GetClientIp(ghttp.RequestFromCtx(ctx))
models.Status = consts.StatusEnabled models.Status = consts.StatusEnabled
@ -161,12 +165,12 @@ func (s *sSysLoginLog) Push(ctx context.Context, in sysin.LoginLogPushInp) {
} }
models.Response = gjson.New(consts.NilJsonToString) models.Response = gjson.New(consts.NilJsonToString)
if in.Response != nil && in.Response.Id > 0 { if in.Response != nil {
models.Response = gjson.New(in.Response) models.Response = gjson.New(in.Response)
} }
if err := queue.Push(consts.QueueLoginLogTopic, models); err != nil { if err := queue.Push(consts.QueueLoginLogTopic, models); err != nil {
g.Log().Warningf(ctx, "sSysLoginLog.Push err:%+v, models:%+v", err, models) g.Log().Warningf(ctx, "push err:%+v, models:%+v", err, models)
} }
return return
} }

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package sys package sys
import ( import (
@ -127,7 +126,7 @@ func (s *sSysProvinces) Status(ctx context.Context, in sysin.ProvincesStatusInp)
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }

View File

@ -15,7 +15,6 @@ import (
"hotgo/internal/consts" "hotgo/internal/consts"
"hotgo/internal/dao" "hotgo/internal/dao"
"hotgo/internal/library/location" "hotgo/internal/library/location"
"hotgo/internal/library/sms"
"hotgo/internal/model" "hotgo/internal/model"
"hotgo/internal/model/entity" "hotgo/internal/model/entity"
"hotgo/internal/model/input/form" "hotgo/internal/model/input/form"
@ -71,7 +70,7 @@ func (s *sSysSmsLog) Status(ctx context.Context, in sysin.SmsLogStatusInp) (err
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }
@ -180,9 +179,9 @@ func (s *sSysSmsLog) SendCode(ctx context.Context, in sysin.SendCodeInp) (err er
in.Code = grand.Digits(4) in.Code = grand.Digits(4)
} }
if err = sms.New(config.SmsDrive).SendCode(ctx, in, config); err != nil { //if err = sms.New(config.SmsDrive).SendCode(ctx, in, config); err != nil {
return // return
} //}
var data = new(entity.SysSmsLog) var data = new(entity.SysSmsLog)
data.Event = in.Event data.Event = in.Event

View File

@ -50,6 +50,7 @@ func (s *sAuthClient) Start(ctx context.Context) {
LoginEvent: s.onLoginEvent, LoginEvent: s.onLoginEvent,
CloseEvent: s.onCloseEvent, CloseEvent: s.onCloseEvent,
}) })
if err != nil { if err != nil {
g.Log().Errorf(ctx, "AuthClient NewClient fail%+v", err) g.Log().Errorf(ctx, "AuthClient NewClient fail%+v", err)
return return

View File

@ -37,7 +37,7 @@ func (s *sCronClient) Start(ctx context.Context) {
} }
simple.SafeGo(ctx, func(ctx context.Context) { simple.SafeGo(ctx, func(ctx context.Context) {
client, err := tcp.NewClient(&tcp.ClientConfig{ s.client, err = tcp.NewClient(&tcp.ClientConfig{
Addr: config.Client.Cron.Address, Addr: config.Client.Cron.Address,
Auth: &tcp.AuthMeta{ Auth: &tcp.AuthMeta{
Group: config.Client.Cron.Group, Group: config.Client.Cron.Group,
@ -48,13 +48,12 @@ func (s *sCronClient) Start(ctx context.Context) {
LoginEvent: s.onLoginEvent, LoginEvent: s.onLoginEvent,
CloseEvent: s.onCloseEvent, CloseEvent: s.onCloseEvent,
}) })
if err != nil { if err != nil {
g.Log().Errorf(ctx, "CronClient NewClient fail%+v", err) g.Log().Errorf(ctx, "CronClient NewClient fail%+v", err)
return return
} }
s.client = client
err = s.client.RegisterRouter(map[string]tcp.RouterHandler{ err = s.client.RegisterRouter(map[string]tcp.RouterHandler{
"CronDelete": s.OnCronDelete, // 删除任务 "CronDelete": s.OnCronDelete, // 删除任务
"CronEdit": s.OnCronEdit, // 编辑任务 "CronEdit": s.OnCronEdit, // 编辑任务

View File

@ -157,6 +157,20 @@ type WechatConfig struct {
*WechatOpenPlatformConfig *WechatOpenPlatformConfig
} }
// LoginConfig 登录配置
type LoginConfig struct {
RegisterSwitch int `json:"loginRegisterSwitch"`
CaptchaSwitch int `json:"loginCaptchaSwitch"`
Avatar string `json:"loginAvatar"`
RoleId int64 `json:"loginRoleId"`
DeptId int64 `json:"loginDeptId"`
PostIds []int64 `json:"loginPostIds"`
Protocol string `json:"loginProtocol"`
Policy string `json:"loginPolicy"`
AutoOpenId int `json:"loginAutoOpenId"`
ForceInvite int `json:"loginForceInvite"`
}
///////////// 以下是本地配置 ///////////// 以下是本地配置
// SSLConfig https配置 // SSLConfig https配置

View File

@ -34,6 +34,7 @@ type AdminMember struct {
Pid interface{} // 上级管理员ID Pid interface{} // 上级管理员ID
Level interface{} // 关系树等级 Level interface{} // 关系树等级
Tree interface{} // 关系树 Tree interface{} // 关系树
InviteCode interface{} // 邀请码
Cash *gjson.Json // 提现配置 Cash *gjson.Json // 提现配置
LastActiveAt *gtime.Time // 最后活跃时间 LastActiveAt *gtime.Time // 最后活跃时间
Remark interface{} // 备注 Remark interface{} // 备注

View File

@ -32,6 +32,7 @@ type AdminMember struct {
Pid int64 `json:"pid" description:"上级管理员ID"` Pid int64 `json:"pid" description:"上级管理员ID"`
Level int `json:"level" description:"关系树等级"` Level int `json:"level" description:"关系树等级"`
Tree string `json:"tree" description:"关系树"` Tree string `json:"tree" description:"关系树"`
InviteCode string `json:"inviteCode" description:"邀请码"`
Cash *gjson.Json `json:"cash" description:"提现配置"` Cash *gjson.Json `json:"cash" description:"提现配置"`
LastActiveAt *gtime.Time `json:"lastActiveAt" description:"最后活跃时间"` LastActiveAt *gtime.Time `json:"lastActiveAt" description:"最后活跃时间"`
Remark string `json:"remark" description:"备注"` Remark string `json:"remark" description:"备注"`

View File

@ -82,48 +82,44 @@ type MemberResetPwdInp struct {
Id int64 `json:"id" dc:"用户ID"` Id int64 `json:"id" dc:"用户ID"`
} }
// MemberEmailUniqueInp 邮箱是否唯一 type LoginMemberInfoModel struct {
type MemberEmailUniqueInp struct { Id int64 `json:"id" dc:"用户ID"`
Email string `json:"email" v:"required#邮箱不能为空" dc:"邮箱"` DeptName string `json:"deptName" dc:"所属部门"`
Id int64 `json:"id" dc:"用户ID"` RoleName string `json:"roleName" dc:"所属角色"`
} Permissions []string `json:"permissions" dc:"角色信息"`
DeptId int64 `json:"-" dc:"部门ID"`
type MemberEmailUniqueModel struct { RoleId int64 `json:"-" dc:"角色ID"`
IsUnique bool Username string `json:"username" dc:"用户名"`
} RealName string `json:"realName" dc:"姓名"`
Avatar string `json:"avatar" dc:"头像"`
// MemberMobileUniqueInp 手机号是否唯一 Balance float64 `json:"balance" dc:"余额"`
type MemberMobileUniqueInp struct { Integral float64 `json:"integral" dc:"积分"`
Mobile string `json:"mobile" v:"required#手机号不能为空" dc:"手机号"` Sex int `json:"sex" dc:"性别"`
Id int64 `json:"id" dc:"用户ID"` Qq string `json:"qq" dc:"qq"`
} Email string `json:"email" dc:"邮箱"`
Mobile string `json:"mobile" dc:"手机号码"`
type MemberMobileUniqueModel struct { Birthday *gtime.Time `json:"birthday" dc:"生日"`
IsUnique bool CityId int64 `json:"cityId" dc:"城市编码"`
} Address string `json:"address" dc:"联系地址"`
Cash *MemberCash `json:"cash" dc:"收款信息"`
// MemberNameUniqueInp 名称是否唯一 CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
type MemberNameUniqueInp struct { OpenId string `json:"openId" dc:"本次登录的openId"` // 区别与绑定的微信openid
Username string `json:"username" v:"required#用户名称不能为空" dc:"用户名称"` InviteCode string `json:"inviteCode" dc:"邀请码"`
Id int64 `json:"id" dc:"用户ID"` *MemberLoginStatModel
}
type MemberNameUniqueModel struct {
IsUnique bool
} }
// MemberEditInp 修改/新增管理员 // MemberEditInp 修改/新增管理员
type MemberEditInp struct { type MemberEditInp struct {
Id int64 `json:"id" dc:""` Id int64 `json:"id" dc:""`
RoleId int `json:"roleId" v:"required#角色不能为空" dc:"角色ID"` RoleId int64 `json:"roleId" v:"required#角色不能为空" dc:"角色ID"`
PostIds []int64 `json:"postIds" v:"required#岗位不能为空" dc:"岗位ID"` PostIds []int64 `json:"postIds" v:"required#岗位不能为空" dc:"岗位ID"`
DeptId int64 `json:"deptId" v:"required#部门不能为空" dc:"部门ID"` DeptId int64 `json:"deptId" v:"required#部门不能为空" dc:"部门ID"`
Username string `json:"username" v:"required#账号不能为空" dc:"帐号"` Username string `json:"username" v:"required#账号不能为空" dc:"帐号"`
PasswordHash string `json:"passwordHash" dc:"密码hash"` PasswordHash string `json:"passwordHash" dc:"密码hash"`
Password string `json:"password" dc:"密码"` Password string `json:"password" dc:"密码"`
RealName string `json:"realName" dc:"真实姓名"` RealName string `json:"realName" dc:"真实姓名"`
Avatar string `json:"avatar" dc:"头像"` Avatar string `json:"avatar" dc:"头像"`
Sex string `json:"sex" dc:"性别"` Sex int `json:"sex" dc:"性别"`
Qq string `json:"qq" dc:"qq"` Qq string `json:"qq" dc:"qq"`
Email string `json:"email" dc:"邮箱"` Email string `json:"email" dc:"邮箱"`
Birthday *gtime.Time `json:"birthday" dc:"生日"` Birthday *gtime.Time `json:"birthday" dc:"生日"`
@ -133,17 +129,18 @@ type MemberEditInp struct {
Address string `json:"address" dc:"默认地址"` Address string `json:"address" dc:"默认地址"`
Mobile string `json:"mobile" dc:"手机号码"` Mobile string `json:"mobile" dc:"手机号码"`
Remark string `json:"remark" dc:"备注"` Remark string `json:"remark" dc:"备注"`
Status string `json:"status" dc:"状态"` Status int `json:"status" dc:"状态"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"` UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"`
} }
type MemberAddInp struct { type MemberAddInp struct {
MemberEditInp MemberEditInp
Salt string `json:"salt" dc:"密码盐"` Salt string `json:"salt" dc:"密码盐"`
Pid int64 `json:"pid" dc:"上级ID"` Pid int64 `json:"pid" dc:"上级ID"`
Level int `json:"level" dc:"等级"` Level int `json:"level" dc:"等级"`
Tree string `json:"tree" dc:"关系树"` Tree string `json:"tree" dc:"关系树"`
InviteCode string `json:"inviteCode" dc:"邀请码"`
} }
func (in *MemberEditInp) Filter(ctx context.Context) (err error) { func (in *MemberEditInp) Filter(ctx context.Context) (err error) {
@ -160,6 +157,12 @@ func (in *MemberEditInp) Filter(ctx context.Context) (err error) {
type MemberEditModel struct{} type MemberEditModel struct{}
// VerifyUniqueInp 验证管理员唯一属性
type VerifyUniqueInp struct {
Id int64
Where g.Map
}
// MemberDeleteInp 删除字典类型 // MemberDeleteInp 删除字典类型
type MemberDeleteInp struct { type MemberDeleteInp struct {
Id interface{} `json:"id" v:"required#用户ID不能为空" dc:"用户ID"` Id interface{} `json:"id" v:"required#用户ID不能为空" dc:"用户ID"`
@ -200,45 +203,6 @@ type MemberListModel struct {
DeptId int64 `json:"deptId" dc:"部门ID"` DeptId int64 `json:"deptId" dc:"部门ID"`
} }
// MemberLoginInp 登录
type MemberLoginInp struct {
Username string
Password string
}
type MemberLoginModel struct {
Id int64 `json:"id" dc:"用户ID"`
Token string `json:"token" dc:"登录token"`
Expires int64 `json:"expires" dc:"登录有效期"`
}
type LoginMemberInfoModel struct {
Id int64 `json:"id" dc:"用户ID"`
DeptName string `json:"deptName" dc:"所属部门"`
RoleName string `json:"roleName" dc:"所属角色"`
Permissions []string `json:"permissions" dc:"角色信息"`
DeptId int64 `json:"-" dc:"部门ID"`
RoleId int64 `json:"-" dc:"角色ID"`
Username string `json:"username" dc:"用户名"`
RealName string `json:"realName" dc:"姓名"`
Avatar string `json:"avatar" dc:"头像"`
Balance float64 `json:"balance" dc:"余额"`
Integral float64 `json:"integral" dc:"积分"`
Sex int `json:"sex" dc:"性别"`
Qq string `json:"qq" dc:"qq"`
Email string `json:"email" dc:"邮箱"`
Mobile string `json:"mobile" dc:"手机号码"`
Birthday *gtime.Time `json:"birthday" dc:"生日"`
CityId int64 `json:"cityId" dc:"城市编码"`
Address string `json:"address" dc:"联系地址"`
Cash *MemberCash `json:"cash" dc:"收款信息"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
OpenId string `json:"openId" dc:"本次登录的openId"` // 区别与绑定的微信openid
*MemberLoginStatModel
}
// MemberLoginPermissions 登录用户角色信息
type MemberLoginPermissions []string
// MemberCash 用户提现配置 // MemberCash 用户提现配置
type MemberCash struct { type MemberCash struct {
Name string `json:"name" dc:"收款人姓名"` Name string `json:"name" dc:"收款人姓名"`
@ -263,17 +227,6 @@ type MemberSelectModel struct {
Avatar string `json:"avatar" dc:"头像"` Avatar string `json:"avatar" dc:"头像"`
} }
// MemberLoginStatInp 用户登录统计
type MemberLoginStatInp struct {
MemberId int64
}
type MemberLoginStatModel struct {
LoginCount int `json:"loginCount" dc:"登录次数"`
LastLoginAt *gtime.Time `json:"lastLoginAt" dc:"最后登录时间"`
LastLoginIp string `json:"lastLoginIp" dc:"最后登录IP"`
}
// MemberAddBalanceInp 增加余额 // MemberAddBalanceInp 增加余额
type MemberAddBalanceInp struct { type MemberAddBalanceInp struct {
Id int64 `json:"id" v:"required#用户ID不能为空" dc:"管理员ID"` Id int64 `json:"id" v:"required#用户ID不能为空" dc:"管理员ID"`

View File

@ -0,0 +1,78 @@
package adminin
import (
"context"
"github.com/gogf/gf/v2/encoding/gbase64"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
"hotgo/internal/consts"
"hotgo/utility/encrypt"
)
// RegisterInp 账号注册
type RegisterInp struct {
Username string `json:"username" v:"required#用户名不能为空" dc:"用户名"`
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
Mobile string `json:"mobile" v:"required|phone-loose#手机号不能为空|手机号格式不正确" dc:"手机号"`
Code string `json:"code" v:"required#验证码不能为空" dc:"验证码"`
InviteCode string `json:"inviteCode" dc:"邀请码"`
}
func (in *RegisterInp) Filter(ctx context.Context) (err error) {
// 解密密码
str, err := gbase64.Decode([]byte(in.Password))
if err != nil {
return err
}
str, err = encrypt.AesECBDecrypt(str, consts.RequestEncryptKey)
if err != nil {
return err
}
password := string(str)
if err = g.Validator().Data(password).Rules("password").Messages("密码长度在6~18之间").Run(ctx); err != nil {
return
}
in.Password = password
return
}
// LoginModel 统一登录响应
type LoginModel struct {
Id int64 `json:"id" dc:"用户ID"`
Username string `json:"username" dc:"用户名"`
Token string `json:"token" dc:"登录token"`
Expires int64 `json:"expires" dc:"登录有效期"`
}
// AccountLoginInp 账号登录
type AccountLoginInp struct {
Username string `json:"username" v:"required#用户名不能为空" dc:"用户名"`
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
Cid string `json:"cid" dc:"验证码ID"`
Code string `json:"code" dc:"验证码"`
IsLock bool `json:"isLock" dc:"是否为锁屏状态"`
}
// MobileLoginInp 手机号登录
type MobileLoginInp struct {
Mobile string `json:"mobile" v:"required|phone-loose#手机号不能为空|手机号格式不正确" dc:"手机号"`
Code string `json:"code" v:"required#验证码不能为空" dc:"验证码"`
}
// MemberLoginPermissions 登录用户角色信息
type MemberLoginPermissions []string
// MemberLoginStatInp 用户登录统计
type MemberLoginStatInp struct {
MemberId int64
}
type MemberLoginStatModel struct {
LoginCount int `json:"loginCount" dc:"登录次数"`
LastLoginAt *gtime.Time `json:"lastLoginAt" dc:"最后登录时间"`
LastLoginIp string `json:"lastLoginIp" dc:"最后登录IP"`
}

View File

@ -88,10 +88,9 @@ type PayViewModel struct {
// PayListInp 获取支付日志列表 // PayListInp 获取支付日志列表
type PayListInp struct { type PayListInp struct {
form.PageReq form.PageReq
Id int64 `json:"id" dc:"ID"` Id int64 `json:"id" dc:"ID"`
Status int `json:"status" dc:"状态"` Status int `json:"status" dc:"状态"`
CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"` CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"`
TestCategoryName string `json:"testCategoryName" dc:"分类名称"`
} }
func (in *PayListInp) Filter(ctx context.Context) (err error) { func (in *PayListInp) Filter(ctx context.Context) (err error) {

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package sysin package sysin
import ( import (
@ -84,7 +83,6 @@ type LoginLogExportModel struct {
// LoginLogPushInp 解推送登录日志 // LoginLogPushInp 解推送登录日志
type LoginLogPushInp struct { type LoginLogPushInp struct {
Input adminin.MemberLoginInp Response *adminin.LoginModel
Response *adminin.MemberLoginModel
Err error Err error
} }

View File

@ -55,8 +55,7 @@ type SmsLogListInp struct {
func (in *SmsLogListInp) Filter(ctx context.Context) (err error) { func (in *SmsLogListInp) Filter(ctx context.Context) (err error) {
if in.Event != "" { if in.Event != "" {
_, ok := consts.SmsTemplateEventMap[in.Event] if _, ok := consts.SmsTemplateEventMap[in.Event]; !ok {
if !ok {
err = gerror.Newf("无效的事件类型:%v", in.Event) err = gerror.Newf("无效的事件类型:%v", in.Event)
return return
} }

View File

@ -25,9 +25,11 @@ func Admin(ctx context.Context, group *ghttp.RouterGroup) {
prefix := g.Cfg().MustGet(ctx, "router.admin.prefix", "/admin") prefix := g.Cfg().MustGet(ctx, "router.admin.prefix", "/admin")
group.Group(prefix.String(), func(group *ghttp.RouterGroup) { group.Group(prefix.String(), func(group *ghttp.RouterGroup) {
group.Bind(
common.Site, // 基础
)
group.Middleware(service.Middleware().AdminAuth) group.Middleware(service.Middleware().AdminAuth)
group.Bind( group.Bind(
common.Site, // 基础
common.Console, // 控制台 common.Console, // 控制台
common.Ems, // 邮件 common.Ems, // 邮件
common.Sms, // 短信 common.Sms, // 短信

View File

@ -19,17 +19,37 @@ import (
) )
type ( type (
IAdminRole interface { IAdminCash interface {
Verify(ctx context.Context, path, method string) bool View(ctx context.Context, in adminin.CashViewInp) (res *adminin.CashViewModel, err error)
List(ctx context.Context, in adminin.RoleListInp) (res *adminin.RoleListModel, totalCount int, err error) List(ctx context.Context, in adminin.CashListInp) (list []*adminin.CashListModel, totalCount int, err error)
GetName(ctx context.Context, RoleId int64) (name string, err error) Apply(ctx context.Context, in adminin.CashApplyInp) (err error)
GetMemberList(ctx context.Context, RoleId int64) (list []*adminin.RoleListModel, err error) Payment(ctx context.Context, in adminin.CashPaymentInp) (err error)
GetPermissions(ctx context.Context, reqInfo *role.GetPermissionsReq) (MenuIds []int64, err error) }
UpdatePermissions(ctx context.Context, reqInfo *role.UpdatePermissionsReq) (err error) IAdminMenu interface {
Edit(ctx context.Context, in *role.EditReq) (err error) MaxSort(ctx context.Context, req *menu.MaxSortReq) (res *menu.MaxSortRes, err error)
Delete(ctx context.Context, in *role.DeleteReq) (err error) NameUnique(ctx context.Context, req *menu.NameUniqueReq) (res *menu.NameUniqueRes, err error)
DataScopeSelect(ctx context.Context) (res form.Selects) CodeUnique(ctx context.Context, req *menu.CodeUniqueReq) (res *menu.CodeUniqueRes, err error)
DataScopeEdit(ctx context.Context, in *adminin.DataScopeEditInp) (err error) Delete(ctx context.Context, req *menu.DeleteReq) (err 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
}
IAdminPost interface {
Delete(ctx context.Context, in adminin.PostDeleteInp) (err error)
Edit(ctx context.Context, in adminin.PostEditInp) (err error)
MaxSort(ctx context.Context, in adminin.PostMaxSortInp) (res *adminin.PostMaxSortModel, err error)
NameUnique(ctx context.Context, in adminin.PostNameUniqueInp) (res *adminin.PostNameUniqueModel, err error)
CodeUnique(ctx context.Context, in adminin.PostCodeUniqueInp) (res *adminin.PostCodeUniqueModel, err 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)
} }
IAdminNotice interface { IAdminNotice interface {
Model(ctx context.Context, option ...*handler.Option) *gdb.Model Model(ctx context.Context, option ...*handler.Option) *gdb.Model
@ -45,11 +65,35 @@ type (
ReadAll(ctx context.Context, in adminin.NoticeReadAllInp) (err error) ReadAll(ctx context.Context, in adminin.NoticeReadAllInp) (err error)
MessageList(ctx context.Context, in adminin.NoticeMessageListInp) (list []*adminin.NoticeMessageListModel, totalCount int, err error) MessageList(ctx context.Context, in adminin.NoticeMessageListInp) (list []*adminin.NoticeMessageListModel, totalCount int, err error)
} }
IAdminCash interface { IAdminOrder interface {
View(ctx context.Context, in adminin.CashViewInp) (res *adminin.CashViewModel, err error) Model(ctx context.Context, option ...*handler.Option) *gdb.Model
List(ctx context.Context, in adminin.CashListInp) (list []*adminin.CashListModel, totalCount int, err error) AcceptRefund(ctx context.Context, in adminin.OrderAcceptRefundInp) (err error)
Apply(ctx context.Context, in adminin.CashApplyInp) (err error) ApplyRefund(ctx context.Context, in adminin.OrderApplyRefundInp) (err error)
Payment(ctx context.Context, in adminin.CashPaymentInp) (err error) PayNotify(ctx context.Context, in payin.NotifyCallFuncInp) (err error)
Create(ctx context.Context, in adminin.OrderCreateInp) (res *adminin.OrderCreateModel, err error)
List(ctx context.Context, in adminin.OrderListInp) (list []*adminin.OrderListModel, totalCount int, err error)
Export(ctx context.Context, in adminin.OrderListInp) (err error)
Edit(ctx context.Context, in adminin.OrderEditInp) (err error)
Delete(ctx context.Context, in adminin.OrderDeleteInp) (err error)
View(ctx context.Context, in adminin.OrderViewInp) (res *adminin.OrderViewModel, err error)
Status(ctx context.Context, in adminin.OrderStatusInp) (err error)
}
IAdminRole interface {
Verify(ctx context.Context, path, method string) bool
List(ctx context.Context, in adminin.RoleListInp) (res *adminin.RoleListModel, totalCount int, err error)
GetName(ctx context.Context, RoleId int64) (name string, err error)
GetMemberList(ctx context.Context, RoleId int64) (list []*adminin.RoleListModel, err error)
GetPermissions(ctx context.Context, reqInfo *role.GetPermissionsReq) (MenuIds []int64, err error)
UpdatePermissions(ctx context.Context, reqInfo *role.UpdatePermissionsReq) (err error)
Edit(ctx context.Context, in *role.EditReq) (err error)
Delete(ctx context.Context, in *role.DeleteReq) (err error)
DataScopeSelect(ctx context.Context) (res form.Selects)
DataScopeEdit(ctx context.Context, in *adminin.DataScopeEditInp) (err error)
}
IAdminSite interface {
Register(ctx context.Context, in adminin.RegisterInp) (err error)
AccountLogin(ctx context.Context, in adminin.AccountLoginInp) (res *adminin.LoginModel, err error)
MobileLogin(ctx context.Context, in adminin.MobileLoginInp) (res *adminin.LoginModel, err error)
} }
IAdminCreditsLog interface { IAdminCreditsLog interface {
Model(ctx context.Context, option ...*handler.Option) *gdb.Model Model(ctx context.Context, option ...*handler.Option) *gdb.Model
@ -78,102 +122,62 @@ type (
UpdateProfile(ctx context.Context, in adminin.MemberUpdateProfileInp) (err error) UpdateProfile(ctx context.Context, in adminin.MemberUpdateProfileInp) (err error)
UpdatePwd(ctx context.Context, in adminin.MemberUpdatePwdInp) (err error) UpdatePwd(ctx context.Context, in adminin.MemberUpdatePwdInp) (err error)
ResetPwd(ctx context.Context, in adminin.MemberResetPwdInp) (err error) ResetPwd(ctx context.Context, in adminin.MemberResetPwdInp) (err error)
EmailUnique(ctx context.Context, in adminin.MemberEmailUniqueInp) (res *adminin.MemberEmailUniqueModel, err error) VerifyUnique(ctx context.Context, in adminin.VerifyUniqueInp) (err error)
MobileUnique(ctx context.Context, in adminin.MemberMobileUniqueInp) (res *adminin.MemberMobileUniqueModel, err error)
NameUnique(ctx context.Context, in adminin.MemberNameUniqueInp) (res *adminin.MemberNameUniqueModel, err error)
VerifySuperId(ctx context.Context, verifyId int64) bool
Delete(ctx context.Context, in adminin.MemberDeleteInp) (err error) Delete(ctx context.Context, in adminin.MemberDeleteInp) (err error)
Edit(ctx context.Context, in adminin.MemberEditInp) (err error) Edit(ctx context.Context, in adminin.MemberEditInp) (err error)
View(ctx context.Context, in adminin.MemberViewInp) (res *adminin.MemberViewModel, err 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) List(ctx context.Context, in adminin.MemberListInp) (list []*adminin.MemberListModel, totalCount int, err error)
LoginMemberInfo(ctx context.Context) (res *adminin.LoginMemberInfoModel, 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) Status(ctx context.Context, in adminin.MemberStatusInp) (err error)
GenTree(ctx context.Context, pid int64) (level int, newTree string, err error)
RoleMemberList(ctx context.Context, in adminin.RoleMemberListInp) (list []*adminin.MemberListModel, totalCount int, err error)
LoginMemberInfo(ctx context.Context) (res *adminin.LoginMemberInfoModel, err error)
MemberLoginStat(ctx context.Context, in adminin.MemberLoginStatInp) (res *adminin.MemberLoginStatModel, err error)
GetIdByCode(ctx context.Context, in adminin.GetIdByCodeInp) (res *adminin.GetIdByCodeModel, err error) GetIdByCode(ctx context.Context, in adminin.GetIdByCodeInp) (res *adminin.GetIdByCodeModel, err error)
Select(ctx context.Context, in adminin.MemberSelectInp) (res []*adminin.MemberSelectModel, err error) Select(ctx context.Context, in adminin.MemberSelectInp) (res []*adminin.MemberSelectModel, err error)
VerifySuperId(ctx context.Context, verifyId int64) bool
FilterAuthModel(ctx context.Context, memberId int64) *gdb.Model FilterAuthModel(ctx context.Context, memberId int64) *gdb.Model
MemberLoginStat(ctx context.Context, in adminin.MemberLoginStatInp) (res *adminin.MemberLoginStatModel, err error)
} }
IAdminMemberPost interface { IAdminMemberPost interface {
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 {
MaxSort(ctx context.Context, req *menu.MaxSortReq) (res *menu.MaxSortRes, err error)
NameUnique(ctx context.Context, req *menu.NameUniqueReq) (res *menu.NameUniqueRes, err error)
CodeUnique(ctx context.Context, req *menu.CodeUniqueReq) (res *menu.CodeUniqueRes, err error)
Delete(ctx context.Context, req *menu.DeleteReq) (err 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
}
IAdminOrder interface {
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
AcceptRefund(ctx context.Context, in adminin.OrderAcceptRefundInp) (err error)
ApplyRefund(ctx context.Context, in adminin.OrderApplyRefundInp) (err error)
PayNotify(ctx context.Context, in payin.NotifyCallFuncInp) (err error)
Create(ctx context.Context, in adminin.OrderCreateInp) (res *adminin.OrderCreateModel, err error)
List(ctx context.Context, in adminin.OrderListInp) (list []*adminin.OrderListModel, totalCount int, err error)
Export(ctx context.Context, in adminin.OrderListInp) (err error)
Edit(ctx context.Context, in adminin.OrderEditInp) (err error)
Delete(ctx context.Context, in adminin.OrderDeleteInp) (err error)
View(ctx context.Context, in adminin.OrderViewInp) (res *adminin.OrderViewModel, err error)
Status(ctx context.Context, in adminin.OrderStatusInp) (err error)
}
IAdminPost interface {
Delete(ctx context.Context, in adminin.PostDeleteInp) (err error)
Edit(ctx context.Context, in adminin.PostEditInp) (err error)
MaxSort(ctx context.Context, in adminin.PostMaxSortInp) (res *adminin.PostMaxSortModel, err error)
NameUnique(ctx context.Context, in adminin.PostNameUniqueInp) (res *adminin.PostNameUniqueModel, err error)
CodeUnique(ctx context.Context, in adminin.PostCodeUniqueInp) (res *adminin.PostCodeUniqueModel, err 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 ( var (
localAdminCash IAdminCash localAdminMemberPost IAdminMemberPost
localAdminNotice IAdminNotice
localAdminOrder IAdminOrder
localAdminRole IAdminRole
localAdminSite IAdminSite
localAdminCreditsLog IAdminCreditsLog localAdminCreditsLog IAdminCreditsLog
localAdminDept IAdminDept localAdminDept IAdminDept
localAdminMember IAdminMember localAdminMember IAdminMember
localAdminMemberPost IAdminMemberPost localAdminPost IAdminPost
localAdminCash IAdminCash
localAdminMenu IAdminMenu localAdminMenu IAdminMenu
localAdminMonitor IAdminMonitor localAdminMonitor IAdminMonitor
localAdminNotice IAdminNotice
localAdminOrder IAdminOrder
localAdminPost IAdminPost
localAdminRole IAdminRole
) )
func AdminMenu() IAdminMenu { func AdminMember() IAdminMember {
if localAdminMenu == nil { if localAdminMember == nil {
panic("implement not found for interface IAdminMenu, forgot register?") panic("implement not found for interface IAdminMember, forgot register?")
} }
return localAdminMenu return localAdminMember
} }
func RegisterAdminMenu(i IAdminMenu) { func RegisterAdminMember(i IAdminMember) {
localAdminMenu = i localAdminMember = i
} }
func AdminMonitor() IAdminMonitor { func AdminMemberPost() IAdminMemberPost {
if localAdminMonitor == nil { if localAdminMemberPost == nil {
panic("implement not found for interface IAdminMonitor, forgot register?") panic("implement not found for interface IAdminMemberPost, forgot register?")
} }
return localAdminMonitor return localAdminMemberPost
} }
func RegisterAdminMonitor(i IAdminMonitor) { func RegisterAdminMemberPost(i IAdminMemberPost) {
localAdminMonitor = i localAdminMemberPost = i
} }
func AdminNotice() IAdminNotice { func AdminNotice() IAdminNotice {
@ -187,15 +191,37 @@ func RegisterAdminNotice(i IAdminNotice) {
localAdminNotice = i localAdminNotice = i
} }
func AdminCash() IAdminCash { func AdminOrder() IAdminOrder {
if localAdminCash == nil { if localAdminOrder == nil {
panic("implement not found for interface IAdminCash, forgot register?") panic("implement not found for interface IAdminOrder, forgot register?")
} }
return localAdminCash return localAdminOrder
} }
func RegisterAdminCash(i IAdminCash) { func RegisterAdminOrder(i IAdminOrder) {
localAdminCash = i localAdminOrder = 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 AdminSite() IAdminSite {
if localAdminSite == nil {
panic("implement not found for interface IAdminSite, forgot register?")
}
return localAdminSite
}
func RegisterAdminSite(i IAdminSite) {
localAdminSite = i
} }
func AdminCreditsLog() IAdminCreditsLog { func AdminCreditsLog() IAdminCreditsLog {
@ -220,37 +246,15 @@ func RegisterAdminDept(i IAdminDept) {
localAdminDept = i localAdminDept = i
} }
func AdminMember() IAdminMember { func AdminMonitor() IAdminMonitor {
if localAdminMember == nil { if localAdminMonitor == nil {
panic("implement not found for interface IAdminMember, forgot register?") panic("implement not found for interface IAdminMonitor, forgot register?")
} }
return localAdminMember return localAdminMonitor
} }
func RegisterAdminMember(i IAdminMember) { func RegisterAdminMonitor(i IAdminMonitor) {
localAdminMember = i localAdminMonitor = i
}
func AdminMemberPost() IAdminMemberPost {
if localAdminMemberPost == nil {
panic("implement not found for interface IAdminMemberPost, forgot register?")
}
return localAdminMemberPost
}
func RegisterAdminMemberPost(i IAdminMemberPost) {
localAdminMemberPost = i
}
func AdminOrder() IAdminOrder {
if localAdminOrder == nil {
panic("implement not found for interface IAdminOrder, forgot register?")
}
return localAdminOrder
}
func RegisterAdminOrder(i IAdminOrder) {
localAdminOrder = i
} }
func AdminPost() IAdminPost { func AdminPost() IAdminPost {
@ -264,13 +268,24 @@ func RegisterAdminPost(i IAdminPost) {
localAdminPost = i localAdminPost = i
} }
func AdminRole() IAdminRole { func AdminCash() IAdminCash {
if localAdminRole == nil { if localAdminCash == nil {
panic("implement not found for interface IAdminRole, forgot register?") panic("implement not found for interface IAdminCash, forgot register?")
} }
return localAdminRole return localAdminCash
} }
func RegisterAdminRole(i IAdminRole) { func RegisterAdminCash(i IAdminCash) {
localAdminRole = i localAdminCash = i
}
func AdminMenu() IAdminMenu {
if localAdminMenu == nil {
panic("implement not found for interface IAdminMenu, forgot register?")
}
return localAdminMenu
}
func RegisterAdminMenu(i IAdminMenu) {
localAdminMenu = i
} }

View File

@ -17,20 +17,112 @@ import (
) )
type ( type (
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) (res *sysin.BlacklistMaxSortModel, err 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) (err 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) (res *sysin.CronGroupMaxSortModel, err 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 {
Delete(ctx context.Context, in sysin.GenCodesDeleteInp) (err error)
Edit(ctx context.Context, in sysin.GenCodesEditInp) (res *sysin.GenCodesEditModel, err error)
Status(ctx context.Context, in sysin.GenCodesStatusInp) (err error)
MaxSort(ctx context.Context, in sysin.GenCodesMaxSortInp) (res *sysin.GenCodesMaxSortModel, err error)
View(ctx context.Context, in sysin.GenCodesViewInp) (res *sysin.GenCodesViewModel, err error)
List(ctx context.Context, in sysin.GenCodesListInp) (list []*sysin.GenCodesListModel, totalCount int, err error)
Selects(ctx context.Context, in sysin.GenCodesSelectsInp) (res *sysin.GenCodesSelectsModel, err error)
TableSelect(ctx context.Context, in sysin.GenCodesTableSelectInp) (res []*sysin.GenCodesTableSelectModel, err error)
ColumnSelect(ctx context.Context, in sysin.GenCodesColumnSelectInp) (res []*sysin.GenCodesColumnSelectModel, err error)
ColumnList(ctx context.Context, in sysin.GenCodesColumnListInp) (res []*sysin.GenCodesColumnListModel, err error)
Preview(ctx context.Context, in sysin.GenCodesPreviewInp) (res *sysin.GenCodesPreviewModel, err error)
Build(ctx context.Context, in sysin.GenCodesBuildInp) (err error)
}
ISysLoginLog interface {
Model(ctx context.Context) *gdb.Model
List(ctx context.Context, in sysin.LoginLogListInp) (list []*sysin.LoginLogListModel, totalCount int, err error)
Export(ctx context.Context, in sysin.LoginLogListInp) (err error)
Delete(ctx context.Context, in sysin.LoginLogDeleteInp) (err error)
View(ctx context.Context, in sysin.LoginLogViewInp) (res *sysin.LoginLogViewModel, err error)
Push(ctx context.Context, in sysin.LoginLogPushInp)
RealWrite(ctx context.Context, models entity.SysLoginLog) (err error)
}
ISysAddonsConfig interface { ISysAddonsConfig interface {
GetConfigByGroup(ctx context.Context, in sysin.GetAddonsConfigInp) (res *sysin.GetAddonsConfigModel, err error) GetConfigByGroup(ctx context.Context, in sysin.GetAddonsConfigInp) (res *sysin.GetAddonsConfigModel, err error)
ConversionType(ctx context.Context, models *entity.SysAddonsConfig) (value interface{}, err error) ConversionType(ctx context.Context, models *entity.SysAddonsConfig) (value interface{}, err error)
UpdateConfigByGroup(ctx context.Context, in sysin.UpdateAddonsConfigInp) (err error) UpdateConfigByGroup(ctx context.Context, in sysin.UpdateAddonsConfigInp) (err error)
} }
ISysCron interface { ISysAttachment interface {
StartCron(ctx context.Context) Model(ctx context.Context, option ...*handler.Option) *gdb.Model
Delete(ctx context.Context, in sysin.CronDeleteInp) (err error) Delete(ctx context.Context, in sysin.AttachmentDeleteInp) (err error)
Edit(ctx context.Context, in sysin.CronEditInp) (err error) Edit(ctx context.Context, in sysin.AttachmentEditInp) (err error)
Status(ctx context.Context, in sysin.CronStatusInp) (err error) Status(ctx context.Context, in sysin.AttachmentStatusInp) (err error)
MaxSort(ctx context.Context, in sysin.CronMaxSortInp) (res *sysin.CronMaxSortModel, err error) MaxSort(ctx context.Context, in sysin.AttachmentMaxSortInp) (res *sysin.AttachmentMaxSortModel, err error)
View(ctx context.Context, in sysin.CronViewInp) (res *sysin.CronViewModel, err error) View(ctx context.Context, in sysin.AttachmentViewInp) (res *sysin.AttachmentViewModel, err error)
List(ctx context.Context, in sysin.CronListInp) (list []*sysin.CronListModel, totalCount int, err error) List(ctx context.Context, in sysin.AttachmentListInp) (list []*sysin.AttachmentListModel, totalCount int, err error)
OnlineExec(ctx context.Context, in sysin.OnlineExecInp) (err error) Add(ctx context.Context, meta *sysin.UploadFileMeta, fullPath, drive string) (models *entity.SysAttachment, err error)
}
ISysConfig interface {
InitConfig(ctx context.Context)
GetLogin(ctx context.Context) (conf *model.LoginConfig, err error)
GetWechat(ctx context.Context) (conf *model.WechatConfig, err error)
GetPay(ctx context.Context) (conf *model.PayConfig, err error)
GetSms(ctx context.Context) (conf *model.SmsConfig, err error)
GetGeo(ctx context.Context) (conf *model.GeoConfig, err error)
GetUpload(ctx context.Context) (conf *model.UploadConfig, err error)
GetSmtp(ctx context.Context) (conf *model.EmailConfig, err error)
GetBasic(ctx context.Context) (conf *model.BasicConfig, err error)
GetLoadTCP(ctx context.Context) (conf *model.TCPConfig, err error)
GetLoadCache(ctx context.Context) (conf *model.CacheConfig, err error)
GetLoadGenerate(ctx context.Context) (conf *model.GenerateConfig, err error)
GetLoadToken(ctx context.Context) (conf *model.TokenConfig, err error)
GetLoadSSL(ctx context.Context) (conf *model.SSLConfig, err error)
GetLoadLog(ctx context.Context) (conf *model.LogConfig, err error)
GetLoadServeLog(ctx context.Context) (conf *model.ServeLogConfig, err error)
GetConfigByGroup(ctx context.Context, in sysin.GetConfigInp) (res *sysin.GetConfigModel, err error)
ConversionType(ctx context.Context, models *entity.SysConfig) (value interface{}, err error)
UpdateConfigByGroup(ctx context.Context, in sysin.UpdateConfigInp) (err error)
}
ISysLog interface {
Export(ctx context.Context, in sysin.LogListInp) (err error)
RealWrite(ctx context.Context, log 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)
}
ISysServeLog interface {
Model(ctx context.Context) *gdb.Model
List(ctx context.Context, in sysin.ServeLogListInp) (list []*sysin.ServeLogListModel, totalCount int, err error)
Export(ctx context.Context, in sysin.ServeLogListInp) (err error)
Delete(ctx context.Context, in sysin.ServeLogDeleteInp) (err error)
View(ctx context.Context, in sysin.ServeLogViewInp) (res *sysin.ServeLogViewModel, err error)
RealWrite(ctx context.Context, models entity.SysServeLog) (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 int, err error)
Select(ctx context.Context, in sysin.DataSelectInp) (list sysin.DataSelectModel, err error)
}
ISysDictType interface {
Tree(ctx context.Context) (list []*sysin.DictTypeTree, err error)
Delete(ctx context.Context, in sysin.DictTypeDeleteInp) (err error)
Edit(ctx context.Context, in sysin.DictTypeEditInp) (err error)
TreeSelect(ctx context.Context, in sysin.DictTreeSelectInp) (list []*sysin.DictTypeTree, err error)
} }
ISysCurdDemo interface { ISysCurdDemo interface {
Model(ctx context.Context, option ...*handler.Option) *gdb.Model Model(ctx context.Context, option ...*handler.Option) *gdb.Model
@ -43,27 +135,6 @@ type (
Status(ctx context.Context, in sysin.CurdDemoStatusInp) (err error) Status(ctx context.Context, in sysin.CurdDemoStatusInp) (err error)
Switch(ctx context.Context, in sysin.CurdDemoSwitchInp) (err error) Switch(ctx context.Context, in sysin.CurdDemoSwitchInp) (err error)
} }
ISysDictType interface {
Tree(ctx context.Context) (list []*sysin.DictTypeTree, err error)
Delete(ctx context.Context, in sysin.DictTypeDeleteInp) (err error)
Edit(ctx context.Context, in sysin.DictTypeEditInp) (err error)
TreeSelect(ctx context.Context, in sysin.DictTreeSelectInp) (list []*sysin.DictTypeTree, err error)
}
ISysCronGroup interface {
Delete(ctx context.Context, in sysin.CronGroupDeleteInp) (err 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) (res *sysin.CronGroupMaxSortModel, err 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)
}
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)
Select(ctx context.Context, in sysin.DataSelectInp) (list sysin.DataSelectModel, err error)
}
ISysEmsLog interface { ISysEmsLog interface {
Delete(ctx context.Context, in sysin.EmsLogDeleteInp) (err error) Delete(ctx context.Context, in sysin.EmsLogDeleteInp) (err error)
Edit(ctx context.Context, in sysin.EmsLogEditInp) (err error) Edit(ctx context.Context, in sysin.EmsLogEditInp) (err error)
@ -75,14 +146,17 @@ 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)
} }
ISysLog interface { ISysProvinces interface {
Export(ctx context.Context, in sysin.LogListInp) (err error) Tree(ctx context.Context) (list []g.Map, err error)
RealWrite(ctx context.Context, log entity.SysLog) (err error) Delete(ctx context.Context, in sysin.ProvincesDeleteInp) (err error)
AutoLog(ctx context.Context) error Edit(ctx context.Context, in sysin.ProvincesEditInp) (err error)
AnalysisLog(ctx context.Context) entity.SysLog Status(ctx context.Context, in sysin.ProvincesStatusInp) (err error)
View(ctx context.Context, in sysin.LogViewInp) (res *sysin.LogViewModel, err error) MaxSort(ctx context.Context, in sysin.ProvincesMaxSortInp) (res *sysin.ProvincesMaxSortModel, err error)
Delete(ctx context.Context, in sysin.LogDeleteInp) (err error) View(ctx context.Context, in sysin.ProvincesViewInp) (res *sysin.ProvincesViewModel, err error)
List(ctx context.Context, in sysin.LogListInp) (list []*sysin.LogListModel, totalCount int, 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)
} }
ISysSmsLog interface { ISysSmsLog interface {
Delete(ctx context.Context, in sysin.SmsLogDeleteInp) (err error) Delete(ctx context.Context, in sysin.SmsLogDeleteInp) (err error)
@ -104,142 +178,47 @@ type (
Upgrade(ctx context.Context, in sysin.AddonsUpgradeInp) (err error) Upgrade(ctx context.Context, in sysin.AddonsUpgradeInp) (err error)
UnInstall(ctx context.Context, in sysin.AddonsUnInstallInp) (err error) UnInstall(ctx context.Context, in sysin.AddonsUnInstallInp) (err error)
} }
ISysConfig interface { ISysCron interface {
InitConfig(ctx context.Context) StartCron(ctx context.Context)
GetLoadTCP(ctx context.Context) (conf *model.TCPConfig, err error) Delete(ctx context.Context, in sysin.CronDeleteInp) (err error)
GetLoadCache(ctx context.Context) (conf *model.CacheConfig, err error) Edit(ctx context.Context, in sysin.CronEditInp) (err error)
GetLoadGenerate(ctx context.Context) (conf *model.GenerateConfig, err error) Status(ctx context.Context, in sysin.CronStatusInp) (err error)
GetLoadToken(ctx context.Context) (conf *model.TokenConfig, err error) MaxSort(ctx context.Context, in sysin.CronMaxSortInp) (res *sysin.CronMaxSortModel, err error)
GetWechat(ctx context.Context) (conf *model.WechatConfig, err error) View(ctx context.Context, in sysin.CronViewInp) (res *sysin.CronViewModel, err error)
GetPay(ctx context.Context) (conf *model.PayConfig, err error) List(ctx context.Context, in sysin.CronListInp) (list []*sysin.CronListModel, totalCount int, err error)
GetSms(ctx context.Context) (conf *model.SmsConfig, err error) OnlineExec(ctx context.Context, in sysin.OnlineExecInp) (err error)
GetGeo(ctx context.Context) (conf *model.GeoConfig, err error)
GetUpload(ctx context.Context) (conf *model.UploadConfig, err error)
GetSmtp(ctx context.Context) (conf *model.EmailConfig, err error)
GetBasic(ctx context.Context) (conf *model.BasicConfig, err error)
GetLoadSSL(ctx context.Context) (conf *model.SSLConfig, err error)
GetLoadLog(ctx context.Context) (conf *model.LogConfig, err error)
GetLoadServeLog(ctx context.Context) (conf *model.ServeLogConfig, err error)
GetConfigByGroup(ctx context.Context, in sysin.GetConfigInp) (res *sysin.GetConfigModel, err error)
ConversionType(ctx context.Context, models *entity.SysConfig) (value interface{}, err error)
UpdateConfigByGroup(ctx context.Context, in sysin.UpdateConfigInp) (err error)
}
ISysLoginLog interface {
Model(ctx context.Context) *gdb.Model
List(ctx context.Context, in sysin.LoginLogListInp) (list []*sysin.LoginLogListModel, totalCount int, err error)
Export(ctx context.Context, in sysin.LoginLogListInp) (err error)
Delete(ctx context.Context, in sysin.LoginLogDeleteInp) (err error)
View(ctx context.Context, in sysin.LoginLogViewInp) (res *sysin.LoginLogViewModel, err error)
Push(ctx context.Context, in sysin.LoginLogPushInp)
RealWrite(ctx context.Context, models entity.SysLoginLog) (err error)
}
ISysProvinces interface {
Tree(ctx context.Context) (list []g.Map, err error)
Delete(ctx context.Context, in sysin.ProvincesDeleteInp) (err 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)
}
ISysServeLog interface {
Model(ctx context.Context) *gdb.Model
List(ctx context.Context, in sysin.ServeLogListInp) (list []*sysin.ServeLogListModel, totalCount int, err error)
Export(ctx context.Context, in sysin.ServeLogListInp) (err error)
Delete(ctx context.Context, in sysin.ServeLogDeleteInp) (err error)
View(ctx context.Context, in sysin.ServeLogViewInp) (res *sysin.ServeLogViewModel, err error)
RealWrite(ctx context.Context, models entity.SysServeLog) (err error)
}
ISysAttachment interface {
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
Delete(ctx context.Context, in sysin.AttachmentDeleteInp) (err 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) (res *sysin.AttachmentMaxSortModel, err 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) (models *entity.SysAttachment, 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) (res *sysin.BlacklistMaxSortModel, err 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)
}
ISysGenCodes interface {
Delete(ctx context.Context, in sysin.GenCodesDeleteInp) (err error)
Edit(ctx context.Context, in sysin.GenCodesEditInp) (res *sysin.GenCodesEditModel, err error)
Status(ctx context.Context, in sysin.GenCodesStatusInp) (err error)
MaxSort(ctx context.Context, in sysin.GenCodesMaxSortInp) (res *sysin.GenCodesMaxSortModel, err error)
View(ctx context.Context, in sysin.GenCodesViewInp) (res *sysin.GenCodesViewModel, err error)
List(ctx context.Context, in sysin.GenCodesListInp) (list []*sysin.GenCodesListModel, totalCount int, err error)
Selects(ctx context.Context, in sysin.GenCodesSelectsInp) (res *sysin.GenCodesSelectsModel, err error)
TableSelect(ctx context.Context, in sysin.GenCodesTableSelectInp) (res []*sysin.GenCodesTableSelectModel, err error)
ColumnSelect(ctx context.Context, in sysin.GenCodesColumnSelectInp) (res []*sysin.GenCodesColumnSelectModel, err error)
ColumnList(ctx context.Context, in sysin.GenCodesColumnListInp) (res []*sysin.GenCodesColumnListModel, err error)
Preview(ctx context.Context, in sysin.GenCodesPreviewInp) (res *sysin.GenCodesPreviewModel, err error)
Build(ctx context.Context, in sysin.GenCodesBuildInp) (err error)
} }
) )
var ( var (
localSysEmsLog ISysEmsLog
localSysLog ISysLog
localSysSmsLog ISysSmsLog
localSysCronGroup ISysCronGroup
localSysDictData ISysDictData localSysDictData ISysDictData
localSysLoginLog ISysLoginLog localSysDictType ISysDictType
localSysProvinces ISysProvinces localSysLog ISysLog
localSysServeLog ISysServeLog localSysServeLog ISysServeLog
localSysProvinces ISysProvinces
localSysSmsLog ISysSmsLog
localSysAddons ISysAddons localSysAddons ISysAddons
localSysConfig ISysConfig localSysCron ISysCron
localSysCurdDemo ISysCurdDemo
localSysEmsLog ISysEmsLog
localSysGenCodes ISysGenCodes localSysGenCodes ISysGenCodes
localSysLoginLog ISysLoginLog
localSysAddonsConfig ISysAddonsConfig
localSysAttachment ISysAttachment localSysAttachment ISysAttachment
localSysBlacklist ISysBlacklist localSysBlacklist ISysBlacklist
localSysCurdDemo ISysCurdDemo localSysCronGroup ISysCronGroup
localSysDictType ISysDictType localSysConfig ISysConfig
localSysAddonsConfig ISysAddonsConfig
localSysCron ISysCron
) )
func SysAddonsConfig() ISysAddonsConfig { func SysDictData() ISysDictData {
if localSysAddonsConfig == nil { if localSysDictData == nil {
panic("implement not found for interface ISysAddonsConfig, forgot register?") panic("implement not found for interface ISysDictData, forgot register?")
} }
return localSysAddonsConfig return localSysDictData
} }
func RegisterSysAddonsConfig(i ISysAddonsConfig) { func RegisterSysDictData(i ISysDictData) {
localSysAddonsConfig = i localSysDictData = 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 SysDictType() ISysDictType { func SysDictType() ISysDictType {
@ -253,39 +232,6 @@ func RegisterSysDictType(i ISysDictType) {
localSysDictType = i localSysDictType = 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 SysEmsLog() ISysEmsLog {
if localSysEmsLog == nil {
panic("implement not found for interface ISysEmsLog, forgot register?")
}
return localSysEmsLog
}
func RegisterSysEmsLog(i ISysEmsLog) {
localSysEmsLog = i
}
func SysLog() ISysLog { func SysLog() ISysLog {
if localSysLog == nil { if localSysLog == nil {
panic("implement not found for interface ISysLog, forgot register?") panic("implement not found for interface ISysLog, forgot register?")
@ -297,6 +243,28 @@ func RegisterSysLog(i ISysLog) {
localSysLog = i localSysLog = 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 SysProvinces() ISysProvinces {
if localSysProvinces == nil {
panic("implement not found for interface ISysProvinces, forgot register?")
}
return localSysProvinces
}
func RegisterSysProvinces(i ISysProvinces) {
localSysProvinces = 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?")
@ -319,15 +287,48 @@ func RegisterSysAddons(i ISysAddons) {
localSysAddons = i localSysAddons = i
} }
func SysConfig() ISysConfig { func SysCron() ISysCron {
if localSysConfig == nil { if localSysCron == nil {
panic("implement not found for interface ISysConfig, forgot register?") panic("implement not found for interface ISysCron, forgot register?")
} }
return localSysConfig return localSysCron
} }
func RegisterSysConfig(i ISysConfig) { func RegisterSysCron(i ISysCron) {
localSysConfig = i 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
}
func SysGenCodes() ISysGenCodes {
if localSysGenCodes == nil {
panic("implement not found for interface ISysGenCodes, forgot register?")
}
return localSysGenCodes
}
func RegisterSysGenCodes(i ISysGenCodes) {
localSysGenCodes = i
} }
func SysLoginLog() ISysLoginLog { func SysLoginLog() ISysLoginLog {
@ -341,26 +342,15 @@ func RegisterSysLoginLog(i ISysLoginLog) {
localSysLoginLog = i localSysLoginLog = i
} }
func SysProvinces() ISysProvinces { func SysAddonsConfig() ISysAddonsConfig {
if localSysProvinces == nil { if localSysAddonsConfig == nil {
panic("implement not found for interface ISysProvinces, forgot register?") panic("implement not found for interface ISysAddonsConfig, forgot register?")
} }
return localSysProvinces return localSysAddonsConfig
} }
func RegisterSysProvinces(i ISysProvinces) { func RegisterSysAddonsConfig(i ISysAddonsConfig) {
localSysProvinces = i localSysAddonsConfig = 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 SysAttachment() ISysAttachment { func SysAttachment() ISysAttachment {
@ -385,13 +375,24 @@ func RegisterSysBlacklist(i ISysBlacklist) {
localSysBlacklist = i localSysBlacklist = i
} }
func SysGenCodes() ISysGenCodes { func SysCronGroup() ISysCronGroup {
if localSysGenCodes == nil { if localSysCronGroup == nil {
panic("implement not found for interface ISysGenCodes, forgot register?") panic("implement not found for interface ISysCronGroup, forgot register?")
} }
return localSysGenCodes return localSysCronGroup
} }
func RegisterSysGenCodes(i ISysGenCodes) { func RegisterSysCronGroup(i ISysCronGroup) {
localSysGenCodes = i localSysCronGroup = i
}
func SysConfig() ISysConfig {
if localSysConfig == nil {
panic("implement not found for interface ISysConfig, forgot register?")
}
return localSysConfig
}
func RegisterSysConfig(i ISysConfig) {
localSysConfig = i
} }

View File

@ -109,14 +109,11 @@ router:
prefix: "/admin" prefix: "/admin"
# 不需要验证登录的路由地址 # 不需要验证登录的路由地址
exceptLogin: [ exceptLogin: [
"/site/captcha", # 登录验证码 "/sms/send", # 短信验证码
"/site/login", # 登录
"/site/ping", # ping
"/wechat/authorizeCall", # 微信用户授权回调 "/wechat/authorizeCall", # 微信用户授权回调
] ]
# 不需要验证权限的路由地址 # 不需要验证权限的路由地址
exceptAuth: [ exceptAuth: [
"/site/config", # 获取后台配置
"/member/info", # 登录用户信息 "/member/info", # 登录用户信息
"/role/dynamic", # 获取动态路由 "/role/dynamic", # 获取动态路由
"/notice/pullMessages", # 拉取我的消息 "/notice/pullMessages", # 拉取我的消息

View File

@ -139,7 +139,7 @@ func (s *s@{.servFunName}) Status(ctx context.Context, in @{.templateGroup}in.@{
return return
} }
if !validate.InSliceInt(consts.StatusMap, in.Status) { if !validate.InSliceInt(consts.StatusSlice, in.Status) {
err = gerror.New("状态不正确") err = gerror.New("状态不正确")
return return
} }

View File

@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/ -- https://www.phpmyadmin.net/
-- --
-- 主机 localhost:3306 -- 主机 localhost:3306
-- 生成日期 2023-05-12 15:45:52 -- 生成日期 2023-05-15 10:04:47
-- 服务器版本 5.7.38-log -- 服务器版本 5.7.38-log
-- PHP 版本 5.6.40 -- PHP 版本 5.6.40
@ -185,6 +185,7 @@ CREATE TABLE `hg_admin_member` (
`pid` bigint(20) NOT NULL COMMENT '上级管理员ID', `pid` bigint(20) NOT NULL COMMENT '上级管理员ID',
`level` int(11) DEFAULT '1' COMMENT '关系树等级', `level` int(11) DEFAULT '1' COMMENT '关系树等级',
`tree` varchar(512) NOT NULL COMMENT '关系树', `tree` varchar(512) NOT NULL COMMENT '关系树',
`invite_code` varchar(12) DEFAULT NULL COMMENT '邀请码',
`cash` json DEFAULT NULL COMMENT '提现配置', `cash` json DEFAULT NULL COMMENT '提现配置',
`last_active_at` datetime DEFAULT NULL COMMENT '最后活跃时间', `last_active_at` datetime DEFAULT NULL COMMENT '最后活跃时间',
`remark` varchar(255) DEFAULT NULL COMMENT '备注', `remark` varchar(255) DEFAULT NULL COMMENT '备注',
@ -197,10 +198,10 @@ CREATE TABLE `hg_admin_member` (
-- 转存表中的数据 `hg_admin_member` -- 转存表中的数据 `hg_admin_member`
-- --
INSERT INTO `hg_admin_member` (`id`, `dept_id`, `role_id`, `real_name`, `username`, `password_hash`, `salt`, `password_reset_token`, `integral`, `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`, `password_reset_token`, `integral`, `balance`, `avatar`, `sex`, `qq`, `email`, `mobile`, `birthday`, `city_id`, `address`, `pid`, `level`, `tree`, `invite_code`, `cash`, `last_active_at`, `remark`, `status`, `created_at`, `updated_at`) VALUES
(1, 100, 1, '孟帅', 'admin', 'a7c588fffeb2c1d99b29879d7fe97c78', '6541561', '', '89.00', '99391.78', '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-05-12 15:44:12', NULL, 1, '2021-02-12 17:59:45', '2023-05-12 15:44:12'), (1, 100, 1, '孟帅', 'admin', 'a7c588fffeb2c1d99b29879d7fe97c78', '6541561', '', '89.00', '99391.78', '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, '', '111', '{\"name\": \"孟帅\", \"account\": \"15303830571\", \"payeeCode\": \"http://bufanyun.cn-bj.ufileos.com/hotgo/attachment/2023-02-09/cqdq8mqal5isvcb58g.jpg\"}', '2023-05-15 09:59:29', NULL, 1, '2021-02-12 17:59:45', '2023-05-15 09:59:29'),
(3, 100, 2, '测试账号', 'test', 'a7c588fffeb2c1d99b29879d7fe97c78', '6541561', '', '0.00', '4.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, '2023-04-29 10:20:16', '', 1, '2022-02-11 17:59:45', '2023-04-29 10:20:16'), (3, 100, 2, '测试账号', 'test', 'a7c588fffeb2c1d99b29879d7fe97c78', '6541561', '', '0.00', '4.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 ', '222', NULL, '2023-05-14 12:29:15', '', 1, '2022-02-11 17:59:45', '2023-05-14 12:29:15'),
(8, 101, 200, 'ameng', 'ameng', '382df3b083a27886edb94e669a857c33', 'hfuUEb', '', '11.00', '3.22', '', 1, '', '', '', NULL, 0, '', 1, 2, 'tr_1 ', NULL, '2023-04-30 20:04:06', '', 1, '2023-02-03 17:34:31', '2023-04-30 20:04:06'); (8, 101, 200, 'ameng', 'ameng', '382df3b083a27886edb94e669a857c33', 'hfuUEb', '', '11.00', '3.22', '', 1, '', '', '', NULL, 0, '', 1, 2, 'tr_1 ', '333', NULL, '2023-05-14 12:25:24', '', 1, '2023-02-03 17:34:31', '2023-05-14 12:25:24');
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -220,8 +221,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),
(8, 2), (8, 2);
(9, 2);
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -300,13 +300,12 @@ INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type
(2073, 2219, '个人设置', 'home_account', 'account', '', 2, '', '', '', '/home/account/account', 1, '', 0, 0, '', 0, 0, 0, 2, '', 10, '', 1, '2022-09-16 17:34:35', '2023-02-01 15:05:57'), (2073, 2219, '个人设置', 'home_account', 'account', '', 2, '', '', '', '/home/account/account', 1, '', 0, 0, '', 0, 0, 0, 2, '', 10, '', 1, '2022-09-16 17:34:35', '2023-02-01 15:05:57'),
(2074, 0, '日志管理', 'Logs', '/log', 'UnorderedListOutlined', 1, '', '', '', 'LAYOUT', 1, '', 0, 0, '', 0, 0, 0, 1, '', 60, '', 1, '2022-09-16 01:38:32', '2023-01-10 17:19:46'), (2074, 0, '日志管理', 'Logs', '/log', 'UnorderedListOutlined', 1, '', '', '', 'LAYOUT', 1, '', 0, 0, '', 0, 0, 0, 1, '', 60, '', 1, '2022-09-16 01:38:32', '2023-01-10 17:19:46'),
(2075, 2074, '访问日志', 'log', 'log', '', 1, '/log/log/index', '', '', 'ParentLayout', 0, '', 0, 0, '', 0, 0, 0, 2, '', 10, '', 1, '2022-09-09 17:39:16', '2023-01-20 23:08:41'), (2075, 2074, '访问日志', 'log', 'log', '', 1, '/log/log/index', '', '', 'ParentLayout', 0, '', 0, 0, '', 0, 0, 0, 2, '', 10, '', 1, '2022-09-09 17:39:16', '2023-01-20 23:08:41'),
(2076, 2074, '登录日志', 'login_log', 'login', '', 1, '/log/login/index', '', '', 'ParentLayout', 0, '', 0, 0, '', 0, 0, 0, 2, '', 20, '', 1, '2022-09-15 20:04:20', '2023-01-20 23:08:43'), (2076, 2074, '登录日志', 'login_log', 'login-log', '', 1, '/log/login-log/index', '', '', 'ParentLayout', 0, '', 0, 0, '', 0, 0, 0, 2, '', 20, '', 1, '2022-09-15 20:04:20', '2023-05-11 22:22:54'),
(2077, 2075, '全局日志详情', 'log_view', 'view/:id?', '', 2, '', '/log/view', '', '/log/log/view', 0, 'log', 0, 0, '', 0, 1, 0, 3, '', 62, '', 1, '2022-09-14 20:07:04', '2022-11-23 22:12:27'), (2077, 2075, '全局日志详情', 'log_view', 'view/:id?', '', 2, '', '/log/view', '', '/log/log/view', 0, 'log', 0, 0, '', 0, 1, 0, 3, '', 62, '', 1, '2022-09-14 20:07:04', '2022-11-23 22:12:27'),
(2078, 2075, '全局日志列表', 'log_list', 'index', '', 2, '', '/log/list', '', '/log/log/index', 0, 'log', 0, 0, '', 0, 1, 0, 3, '', 61, '', 1, '2022-09-15 04:38:33', '2022-11-23 22:12:07'), (2078, 2075, '全局日志列表', 'log_list', 'index', '', 2, '', '/log/list', '', '/log/log/index', 0, 'log', 0, 0, '', 0, 1, 0, 3, '', 61, '', 1, '2022-09-15 04:38:33', '2022-11-23 22:12:07'),
(2082, 2076, '登录日志详情', 'loginLogView', 'view/:id?', '', 2, '', '/loginLog/view', '', '/log/login-log/view', 0, 'login_log', 0, 0, '', 0, 1, 0, 3, '', 62, '', 1, '2022-09-14 20:07:04', '2023-01-19 21:13:43'), (2082, 2076, '登录日志详情', 'loginLogView', 'view/:id?', '', 2, '', '/loginLog/view', '', '/log/login-log/view', 0, 'login_log', 0, 0, '', 0, 1, 0, 3, '', 62, '', 1, '2022-09-14 20:07:04', '2023-01-19 21:13:43'),
(2083, 2076, '登录列表', 'login_log_index', 'index', '', 2, '', '', '', '/log/login-log/index', 0, 'login_log', 0, 0, '', 0, 1, 0, 3, '', 61, '', 1, '2022-09-15 04:38:33', '2022-11-23 22:11:14'), (2083, 2076, '登录列表', 'login_log_index', 'index', '', 2, '', '', '', '/log/login-log/index', 0, 'login_log', 0, 0, '', 0, 1, 0, 3, '', 61, '', 1, '2022-09-15 04:38:33', '2023-05-11 22:23:46'),
(2084, 2074, '短信记录', 'sms_log', 'sms', '', 1, '/log/sms/index', '', '', 'ParentLayout', 1, '', 0, 0, '', 0, 0, 0, 2, '', 70, '', 1, '2022-09-17 19:13:51', '2023-01-21 10:07:09'), (2084, 2074, '短信记录', 'sms_log', 'sms', '', 1, '', '', '', '/log/sms-log/index', 0, '', 0, 0, '', 0, 0, 0, 2, '', 70, '', 1, '2022-09-17 19:13:51', '2023-05-11 21:59:17'),
(2086, 2084, '日志列表', 'sms_log_index', 'index', '', 2, '', '', '', '/log/sms-log/index', 0, 'sms_log', 0, 0, '', 0, 1, 0, 3, '', 61, '', 1, '2022-09-15 04:38:33', '2023-01-21 10:08:31'),
(2087, 2074, '服务日志', 'monitor_serve_log', 'serve_log', '', 1, '/log/serve_log/index', '', '', 'ParentLayout', 1, '', 0, 0, '', 0, 0, 0, 2, '', 30, '', 1, '2022-09-18 20:59:28', '2023-01-20 23:08:50'), (2087, 2074, '服务日志', 'monitor_serve_log', 'serve_log', '', 1, '/log/serve_log/index', '', '', 'ParentLayout', 1, '', 0, 0, '', 0, 0, 0, 2, '', 30, '', 1, '2022-09-18 20:59:28', '2023-01-20 23:08:50'),
(2088, 2087, '服务日志详情', 'monitor_serve_log_view', 'view/:id?', '', 2, '', '/serve_log/view', '', '/monitor/serve-log/view', 0, 'monitor_serve_log', 0, 0, '', 0, 1, 0, 3, '', 62, '', 1, '2022-09-14 20:07:04', '2023-01-20 18:41:13'), (2088, 2087, '服务日志详情', 'monitor_serve_log_view', 'view/:id?', '', 2, '', '/serve_log/view', '', '/monitor/serve-log/view', 0, 'monitor_serve_log', 0, 0, '', 0, 1, 0, 3, '', 62, '', 1, '2022-09-14 20:07:04', '2023-01-20 18:41:13'),
(2089, 2087, '服务日志列表', 'monitor_serve_log_index', 'index', '', 2, '', '', '', '/monitor/serve-log/index', 0, 'monitor_serve_log', 0, 0, '', 0, 1, 0, 2, '', 61, '', 1, '2022-09-15 04:38:33', '2022-09-18 13:14:27'), (2089, 2087, '服务日志列表', 'monitor_serve_log_index', 'index', '', 2, '', '', '', '/monitor/serve-log/index', 0, 'monitor_serve_log', 0, 0, '', 0, 1, 0, 2, '', 61, '', 1, '2022-09-15 04:38:33', '2022-09-18 13:14:27'),
@ -346,8 +345,8 @@ INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type
(2204, 2199, '修改生成演示状态', 'curdDemoStatus', '', '', 3, '', '/curdDemo/status', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-18 15:19:43', '2023-01-18 15:19:43'), (2204, 2199, '修改生成演示状态', 'curdDemoStatus', '', '', 3, '', '/curdDemo/status', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-18 15:19:43', '2023-01-18 15:19:43'),
(2205, 2199, '操作生成演示开关', 'curdDemoSwitch', '', '', 3, '', '/curdDemo/switch', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-18 15:19:43', '2023-01-18 15:19:43'), (2205, 2199, '操作生成演示开关', 'curdDemoSwitch', '', '', 3, '', '/curdDemo/switch', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-18 15:19:43', '2023-01-18 15:19:43'),
(2206, 2199, '导出生成演示', 'curdDemoExport', '', '', 3, '', '/curdDemo/export', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-18 15:19:43', '2023-01-18 15:19:43'), (2206, 2199, '导出生成演示', 'curdDemoExport', '', '', 3, '', '/curdDemo/export', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-18 15:19:43', '2023-01-18 15:19:43'),
(2207, 2083, '删除登录日志', 'loginLogDelete', '', '', 3, '', '/loginLog/delete', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-19 21:06:45', '2023-01-19 21:06:45'), (2207, 2076, '删除登录日志', 'loginLogDelete', '', '', 3, '', '/loginLog/delete', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-19 21:06:45', '2023-05-11 22:12:05'),
(2208, 2083, '导出登录日志', 'loginLogExport', '', '', 3, '', '/loginLog/export', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-19 21:06:45', '2023-01-19 21:06:45'), (2208, 2076, '导出登录日志', 'loginLogExport', '', '', 3, '', '/loginLog/export', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-19 21:06:45', '2023-05-11 22:12:21'),
(2209, 2087, '删除服务日志', 'serveLogDelete', '', '', 3, '', '/serveLog/delete', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-20 18:37:50', '2023-01-20 18:37:50'), (2209, 2087, '删除服务日志', 'serveLogDelete', '', '', 3, '', '/serveLog/delete', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-20 18:37:50', '2023-01-20 18:37:50'),
(2210, 2087, '导出服务日志', 'serveLogExport', '', '', 3, '', '/serveLog/export', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-20 18:37:50', '2023-01-20 18:37:50'), (2210, 2087, '导出服务日志', 'serveLogExport', '', '', 3, '', '/serveLog/export', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-20 18:37:50', '2023-01-20 18:37:50'),
(2211, 2094, '获取公告最大排序', 'noticeMaxSort', '', '', 3, '', '/notice/maxSort', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-18 15:19:43', '2023-01-18 15:19:43'), (2211, 2094, '获取公告最大排序', 'noticeMaxSort', '', '', 3, '', '/notice/maxSort', '', '', 1, '', 0, 0, '', 0, 0, 0, 3, '', 10, '', 1, '2023-01-18 15:19:43', '2023-01-18 15:19:43'),
@ -601,201 +600,201 @@ CREATE TABLE `hg_admin_role_casbin` (
-- --
INSERT INTO `hg_admin_role_casbin` (`id`, `p_type`, `v0`, `v1`, `v2`, `v3`, `v4`, `v5`) VALUES INSERT INTO `hg_admin_role_casbin` (`id`, `p_type`, `v0`, `v1`, `v2`, `v3`, `v4`, `v5`) VALUES
(20042, 'p', 'manage', 'dashboard', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28037, 'p', 'manage', 'dashboard', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20043, 'p', 'manage', '/console/stat', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28038, 'p', 'manage', '/console/stat', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20044, 'p', 'manage', 'dashboard_workplace', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28039, 'p', 'manage', 'dashboard_workplace', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20045, 'p', 'manage', '/dept/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28040, 'p', 'manage', '/dept/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20046, 'p', 'manage', '/post/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28041, 'p', 'manage', '/post/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20047, 'p', 'manage', '/role/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28042, 'p', 'manage', '/role/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20048, 'p', 'manage', '/member/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28043, 'p', 'manage', '/member/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20049, 'p', 'manage', '/dept/option', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28044, 'p', 'manage', '/dept/option', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20050, 'p', 'manage', '/post/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28045, 'p', 'manage', '/post/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20051, 'p', 'manage', '/menu/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28046, 'p', 'manage', '/menu/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20052, 'p', 'manage', '/role/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28047, 'p', 'manage', '/role/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20053, 'p', 'manage', '/log/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28048, 'p', 'manage', '/log/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20054, 'p', 'manage', '/log/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28049, 'p', 'manage', '/log/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20055, 'p', 'manage', '/loginLog/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28050, 'p', 'manage', '/loginLog/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20056, 'p', 'manage', '/serve_log/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28051, 'p', 'manage', '/serve_log/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20057, 'p', 'manage', '/notice/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28052, 'p', 'manage', '/notice/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20058, 'p', 'manage', '/attachment/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28053, 'p', 'manage', '/attachment/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20059, 'p', 'manage', '/provinces/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28054, 'p', 'manage', '/provinces/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20060, 'p', 'manage', '/member/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28055, 'p', 'manage', '/member/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20061, 'p', 'manage', '/member/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28056, 'p', 'manage', '/member/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20062, 'p', 'manage', '/member/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28057, 'p', 'manage', '/member/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20063, 'p', 'manage', '/member/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28058, 'p', 'manage', '/member/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20064, 'p', 'manage', '/dept/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28059, 'p', 'manage', '/dept/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20065, 'p', 'manage', '/dept/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28060, 'p', 'manage', '/dept/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20066, 'p', 'manage', '/dept/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28061, 'p', 'manage', '/dept/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20067, 'p', 'manage', '/post/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28062, 'p', 'manage', '/post/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20068, 'p', 'manage', '/post/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28063, 'p', 'manage', '/post/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20069, 'p', 'manage', '/post/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28064, 'p', 'manage', '/post/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20070, 'p', 'manage', '/upload/image', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28065, 'p', 'manage', '/upload/image', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20071, 'p', 'manage', '/hgexample/table/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28066, 'p', 'manage', '/hgexample/table/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20072, 'p', 'manage', '/hgexample/table/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28067, 'p', 'manage', '/hgexample/table/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20073, 'p', 'manage', '/curdDemo/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28068, 'p', 'manage', '/curdDemo/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20074, 'p', 'manage', '/curdDemo/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28069, 'p', 'manage', '/curdDemo/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20075, 'p', 'manage', '/curdDemo/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28070, 'p', 'manage', '/curdDemo/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20076, 'p', 'manage', '/curdDemo/maxSort', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28071, 'p', 'manage', '/curdDemo/maxSort', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20077, 'p', 'manage', '/curdDemo/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28072, 'p', 'manage', '/curdDemo/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20078, 'p', 'manage', '/curdDemo/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28073, 'p', 'manage', '/curdDemo/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20079, 'p', 'manage', '/curdDemo/switch', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28074, 'p', 'manage', '/curdDemo/switch', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20080, 'p', 'manage', '/curdDemo/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28075, 'p', 'manage', '/curdDemo/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20081, 'p', 'manage', '/loginLog/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28076, 'p', 'manage', '/loginLog/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20082, 'p', 'manage', '/loginLog/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28077, 'p', 'manage', '/loginLog/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20083, 'p', 'manage', '/serveLog/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28078, 'p', 'manage', '/serveLog/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20084, 'p', 'manage', '/serveLog/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28079, 'p', 'manage', '/serveLog/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20085, 'p', 'manage', '/notice/maxSort', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28080, 'p', 'manage', '/notice/maxSort', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20086, 'p', 'manage', '/notice/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28081, 'p', 'manage', '/notice/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20087, 'p', 'manage', '/notice/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28082, 'p', 'manage', '/notice/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20088, 'p', 'manage', '/notice/switch', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28083, 'p', 'manage', '/notice/switch', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20089, 'p', 'manage', '/notice/editNotify', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28084, 'p', 'manage', '/notice/editNotify', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20090, 'p', 'manage', '/notice/editNotice', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28085, 'p', 'manage', '/notice/editNotice', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20091, 'p', 'manage', '/notice/editLetter', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28086, 'p', 'manage', '/notice/editLetter', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20092, 'p', 'manage', '/notice/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28087, 'p', 'manage', '/notice/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20093, 'p', 'manage', '/test/maxSort', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28088, 'p', 'manage', '/test/maxSort', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20094, 'p', 'manage', '/test/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28089, 'p', 'manage', '/test/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20095, 'p', 'manage', '/test/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28090, 'p', 'manage', '/test/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20096, 'p', 'manage', '/test/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28091, 'p', 'manage', '/test/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20097, 'p', 'manage', '/test/switch', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28092, 'p', 'manage', '/test/switch', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20098, 'p', 'manage', '/test/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28093, 'p', 'manage', '/test/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20099, 'p', 'manage', '/order/create', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28094, 'p', 'manage', '/order/create', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20100, 'p', 'manage', '/creditsLog/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28095, 'p', 'manage', '/creditsLog/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20101, 'p', 'manage', '/creditsLog/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28096, 'p', 'manage', '/creditsLog/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20102, 'p', 'manage', '/order/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28097, 'p', 'manage', '/order/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20103, 'p', 'manage', '/order/acceptRefund', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28098, 'p', 'manage', '/order/acceptRefund', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20104, 'p', 'manage', '/order/applyRefund', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28099, 'p', 'manage', '/order/applyRefund', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20105, 'p', 'manage', '/order/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28100, 'p', 'manage', '/order/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20106, 'p', 'manage', '/cash/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28101, 'p', 'manage', '/cash/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20107, 'p', 'manage', '/cash/apply', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28102, 'p', 'manage', '/cash/apply', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20108, 'p', 'manage', '/cash/apply', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28103, 'p', 'manage', '/cash/apply', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20109, 'p', 'manage', '/cash/payment', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28104, 'p', 'manage', '/cash/payment', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20110, 'p', 'manage', '/cash/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28105, 'p', 'manage', '/cash/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20111, 'p', 'manage', '/member/addBalance', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28106, 'p', 'manage', '/member/addBalance', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20112, 'p', 'manage', '/member/addIntegral', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28107, 'p', 'manage', '/member/addIntegral', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20113, 'p', 'manage', '/member/resetPwd', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28108, 'p', 'manage', '/member/resetPwd', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20114, 'p', 'manage', '/dept/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28109, 'p', 'manage', '/dept/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20115, 'p', 'manage', '/post/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28110, 'p', 'manage', '/post/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20116, 'p', 'manage', '/role/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28111, 'p', 'manage', '/role/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20117, 'p', 'manage', '/member/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28112, 'p', 'manage', '/member/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20118, 'p', 'manage', '/dept/option', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28113, 'p', 'manage', '/dept/option', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20119, 'p', 'manage', '/config/get', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28114, 'p', 'manage', '/config/get', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20120, 'p', 'manage', '/config/update', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28115, 'p', 'manage', '/config/update', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20121, 'p', 'manage', '/dictType/tree', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28116, 'p', 'manage', '/dictType/tree', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20122, 'p', 'manage', '/dictData/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28117, 'p', 'manage', '/dictData/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20123, 'p', 'manage', '/config/typeSelect', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28118, 'p', 'manage', '/config/typeSelect', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20124, 'p', 'manage', '/dictData/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28119, 'p', 'manage', '/dictData/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20125, 'p', 'manage', '/dictData/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28120, 'p', 'manage', '/dictData/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20126, 'p', 'manage', '/dictType/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28121, 'p', 'manage', '/dictType/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20127, 'p', 'manage', '/dictType/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28122, 'p', 'manage', '/dictType/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20128, 'p', 'manage', '/cron/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28123, 'p', 'manage', '/cron/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20129, 'p', 'manage', '/cronGroup/select', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28124, 'p', 'manage', '/cronGroup/select', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20130, 'p', 'manage', '/cronGroup/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28125, 'p', 'manage', '/cronGroup/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20131, 'p', 'manage', '/cron/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28126, 'p', 'manage', '/cron/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20132, 'p', 'manage', '/cron/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28127, 'p', 'manage', '/cron/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20133, 'p', 'manage', '/cron/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28128, 'p', 'manage', '/cron/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20134, 'p', 'manage', '/cron/onlineExec', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28129, 'p', 'manage', '/cron/onlineExec', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20135, 'p', 'manage', '/cronGroup/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28130, 'p', 'manage', '/cronGroup/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20136, 'p', 'manage', '/cronGroup/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28131, 'p', 'manage', '/cronGroup/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20137, 'p', 'manage', '/blacklist/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28132, 'p', 'manage', '/blacklist/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20138, 'p', 'manage', '/blacklist/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28133, 'p', 'manage', '/blacklist/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20139, 'p', 'manage', '/blacklist/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28134, 'p', 'manage', '/blacklist/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20140, 'p', 'manage', '/blacklist/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28135, 'p', 'manage', '/blacklist/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20141, 'p', 'gold_agent', 'dashboard', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28136, 'p', 'gold_agent', 'dashboard', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20142, 'p', 'gold_agent', '/console/stat', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28137, 'p', 'gold_agent', '/console/stat', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20143, 'p', 'gold_agent', 'dashboard_workplace', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28138, 'p', 'gold_agent', 'dashboard_workplace', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20144, 'p', 'gold_agent', '/dept/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28139, 'p', 'gold_agent', '/dept/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20145, 'p', 'gold_agent', '/post/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28140, 'p', 'gold_agent', '/post/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20146, 'p', 'gold_agent', '/role/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28141, 'p', 'gold_agent', '/role/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20147, 'p', 'gold_agent', '/member/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28142, 'p', 'gold_agent', '/member/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20148, 'p', 'gold_agent', '/dept/option', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28143, 'p', 'gold_agent', '/dept/option', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20149, 'p', 'gold_agent', '/member/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28144, 'p', 'gold_agent', '/member/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20150, 'p', 'gold_agent', '/member/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28145, 'p', 'gold_agent', '/member/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20151, 'p', 'gold_agent', '/member/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28146, 'p', 'gold_agent', '/member/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20152, 'p', 'gold_agent', '/member/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28147, 'p', 'gold_agent', '/member/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20153, 'p', 'gold_agent', '/order/create', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28148, 'p', 'gold_agent', '/order/create', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20154, 'p', 'gold_agent', '/creditsLog/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28149, 'p', 'gold_agent', '/creditsLog/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20155, 'p', 'gold_agent', '/creditsLog/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28150, 'p', 'gold_agent', '/creditsLog/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20156, 'p', 'gold_agent', '/order/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28151, 'p', 'gold_agent', '/order/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20157, 'p', 'gold_agent', '/order/acceptRefund', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28152, 'p', 'gold_agent', '/order/acceptRefund', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20158, 'p', 'gold_agent', '/order/applyRefund', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28153, 'p', 'gold_agent', '/order/applyRefund', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20159, 'p', 'gold_agent', '/order/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28154, 'p', 'gold_agent', '/order/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20160, 'p', 'gold_agent', '/cash/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28155, 'p', 'gold_agent', '/cash/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20161, 'p', 'gold_agent', '/cash/apply', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28156, 'p', 'gold_agent', '/cash/apply', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20162, 'p', 'gold_agent', '/cash/apply', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28157, 'p', 'gold_agent', '/cash/apply', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20163, 'p', 'gold_agent', '/cash/payment', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28158, 'p', 'gold_agent', '/cash/payment', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20164, 'p', 'gold_agent', '/cash/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28159, 'p', 'gold_agent', '/cash/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20165, 'p', 'gold_agent', '/member/addBalance', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28160, 'p', 'gold_agent', '/member/addBalance', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20166, 'p', 'gold_agent', '/member/addIntegral', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28161, 'p', 'gold_agent', '/member/addIntegral', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20167, 'p', 'gold_agent', '/member/resetPwd', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28162, 'p', 'gold_agent', '/member/resetPwd', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20168, 'p', 'gold_agent', '/dept/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28163, 'p', 'gold_agent', '/dept/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20169, 'p', 'gold_agent', '/post/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28164, 'p', 'gold_agent', '/post/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20170, 'p', 'gold_agent', '/role/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28165, 'p', 'gold_agent', '/role/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20171, 'p', 'gold_agent', '/member/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28166, 'p', 'gold_agent', '/member/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20172, 'p', 'gold_agent', '/dept/option', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28167, 'p', 'gold_agent', '/dept/option', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20173, 'p', 'gold_agent', '/member/updatePwd', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28168, 'p', 'gold_agent', '/member/updatePwd', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20174, 'p', 'gold_agent', '/member/updateMobile', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28169, 'p', 'gold_agent', '/member/updateMobile', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20175, 'p', 'gold_agent', '/member/updateEmail', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28170, 'p', 'gold_agent', '/member/updateEmail', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20176, 'p', 'silver_agent', 'dashboard', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28171, 'p', 'silver_agent', 'dashboard', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20177, 'p', 'silver_agent', '/console/stat', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28172, 'p', 'silver_agent', '/console/stat', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20178, 'p', 'silver_agent', 'dashboard_workplace', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28173, 'p', 'silver_agent', 'dashboard_workplace', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20179, 'p', 'copper_agent', 'dashboard', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28174, 'p', 'copper_agent', 'dashboard', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20180, 'p', 'copper_agent', '/console/stat', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28175, 'p', 'copper_agent', '/console/stat', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20181, 'p', 'copper_agent', 'dashboard_workplace', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28176, 'p', 'copper_agent', 'dashboard_workplace', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20182, 'p', 'finance', 'dashboard', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28177, 'p', 'finance', 'dashboard', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20183, 'p', 'finance', '/console/stat', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28178, 'p', 'finance', '/console/stat', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20184, 'p', 'finance', 'dashboard_workplace', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28179, 'p', 'finance', 'dashboard_workplace', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20185, 'p', 'finance', '/dept/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28180, 'p', 'finance', '/dept/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20186, 'p', 'finance', '/post/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28181, 'p', 'finance', '/post/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20187, 'p', 'finance', '/role/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28182, 'p', 'finance', '/role/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20188, 'p', 'finance', '/member/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28183, 'p', 'finance', '/member/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20189, 'p', 'finance', '/dept/option', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28184, 'p', 'finance', '/dept/option', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20190, 'p', 'finance', '/post/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28185, 'p', 'finance', '/post/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20191, 'p', 'finance', '/menu/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28186, 'p', 'finance', '/menu/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20192, 'p', 'finance', '/role/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28187, 'p', 'finance', '/role/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20193, 'p', 'finance', '/log/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28188, 'p', 'finance', '/log/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20194, 'p', 'finance', '/log/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28189, 'p', 'finance', '/log/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20195, 'p', 'finance', '/loginLog/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28190, 'p', 'finance', '/loginLog/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20196, 'p', 'finance', '/serve_log/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28191, 'p', 'finance', '/serve_log/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20197, 'p', 'finance', '/notice/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28192, 'p', 'finance', '/notice/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20198, 'p', 'finance', '/attachment/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28193, 'p', 'finance', '/attachment/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20199, 'p', 'finance', '/provinces/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28194, 'p', 'finance', '/provinces/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20200, 'p', 'finance', '/member/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28195, 'p', 'finance', '/member/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20201, 'p', 'finance', '/member/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28196, 'p', 'finance', '/member/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20202, 'p', 'finance', '/member/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28197, 'p', 'finance', '/member/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20203, 'p', 'finance', '/member/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28198, 'p', 'finance', '/member/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20204, 'p', 'finance', '/dept/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28199, 'p', 'finance', '/dept/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20205, 'p', 'finance', '/dept/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28200, 'p', 'finance', '/dept/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20206, 'p', 'finance', '/dept/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28201, 'p', 'finance', '/dept/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20207, 'p', 'finance', '/post/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28202, 'p', 'finance', '/post/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20208, 'p', 'finance', '/post/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28203, 'p', 'finance', '/post/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20209, 'p', 'finance', '/post/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28204, 'p', 'finance', '/post/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20210, 'p', 'finance', '/upload/image', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28205, 'p', 'finance', '/upload/image', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20211, 'p', 'finance', '/hgexample/table/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28206, 'p', 'finance', '/hgexample/table/list', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20212, 'p', 'finance', '/hgexample/table/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28207, 'p', 'finance', '/hgexample/table/view', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20213, 'p', 'finance', '/loginLog/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28208, 'p', 'finance', '/loginLog/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20214, 'p', 'finance', '/loginLog/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28209, 'p', 'finance', '/loginLog/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20215, 'p', 'finance', '/serveLog/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28210, 'p', 'finance', '/serveLog/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20216, 'p', 'finance', '/serveLog/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28211, 'p', 'finance', '/serveLog/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20217, 'p', 'finance', '/notice/maxSort', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28212, 'p', 'finance', '/notice/maxSort', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20218, 'p', 'finance', '/notice/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28213, 'p', 'finance', '/notice/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20219, 'p', 'finance', '/notice/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28214, 'p', 'finance', '/notice/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20220, 'p', 'finance', '/notice/switch', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28215, 'p', 'finance', '/notice/switch', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20221, 'p', 'finance', '/notice/editNotify', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28216, 'p', 'finance', '/notice/editNotify', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20222, 'p', 'finance', '/notice/editNotice', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28217, 'p', 'finance', '/notice/editNotice', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20223, 'p', 'finance', '/notice/editLetter', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28218, 'p', 'finance', '/notice/editLetter', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20224, 'p', 'finance', '/notice/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28219, 'p', 'finance', '/notice/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20225, 'p', 'finance', '/test/maxSort', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28220, 'p', 'finance', '/test/maxSort', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20226, 'p', 'finance', '/test/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28221, 'p', 'finance', '/test/export', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20227, 'p', 'finance', '/test/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28222, 'p', 'finance', '/test/delete', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20228, 'p', 'finance', '/test/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28223, 'p', 'finance', '/test/status', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20229, 'p', 'finance', '/test/switch', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28224, 'p', 'finance', '/test/switch', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20230, 'p', 'finance', '/test/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28225, 'p', 'finance', '/test/edit', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20231, 'p', 'business', 'dashboard', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28226, 'p', 'business', 'dashboard', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20232, 'p', 'business', '/console/stat', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28227, 'p', 'business', '/console/stat', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20233, 'p', 'business', 'dashboard_workplace', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28228, 'p', 'business', 'dashboard_workplace', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20234, 'p', 'science', 'dashboard', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28229, 'p', 'science', 'dashboard', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20235, 'p', 'science', '/console/stat', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''), (28230, 'p', 'science', '/console/stat', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''),
(20236, 'p', 'science', 'dashboard_workplace', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', ''); (28231, 'p', 'science', 'dashboard_workplace', 'GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD', '', '', '');
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -1216,6 +1215,13 @@ CREATE TABLE `hg_sys_attachment` (
`updated_at` datetime DEFAULT NULL COMMENT '修改时间' `updated_at` datetime DEFAULT NULL COMMENT '修改时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统_附件管理'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统_附件管理';
--
-- 转存表中的数据 `hg_sys_attachment`
--
INSERT INTO `hg_sys_attachment` (`id`, `app_id`, `member_id`, `cate_id`, `drive`, `name`, `kind`, `meta_type`, `naive_type`, `path`, `file_url`, `size`, `ext`, `md5`, `status`, `created_at`, `updated_at`) VALUES
(55, 'admin', 1, 0, 'local', 'logo.png', 'images', 'image/png', '', 'attachment/2023-05-14/csltf747yrr4gd4kc5.png', 'attachment/2023-05-14/csltf747yrr4gd4kc5.png', 38601, 'png', '492c0e0f0eb8e7e6c7b6901d32854d19', 1, '2023-05-14 15:17:25', '2023-05-14 15:17:25');
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
@ -1273,8 +1279,6 @@ INSERT INTO `hg_sys_config` (`id`, `group`, `name`, `type`, `key`, `value`, `def
(1, 'theme', '默认主题', 'string', 'themeDarkTheme', 'dark', 'dark', 50, '', 1, 1, '2021-01-30 13:27:43', '2022-09-05 20:29:05'), (1, 'theme', '默认主题', 'string', 'themeDarkTheme', 'dark', 'dark', 50, '', 1, 1, '2021-01-30 13:27:43', '2022-09-05 20:29:05'),
(2, 'theme', '默认系统主题', 'string', 'themeAppTheme', '#2d8cf0', '#2d8cf0', 60, '', 1, 1, '2021-01-30 13:27:43', '2022-09-05 20:29:05'), (2, 'theme', '默认系统主题', 'string', 'themeAppTheme', '#2d8cf0', '#2d8cf0', 60, '', 1, 1, '2021-01-30 13:27:43', '2022-09-05 20:29:05'),
(3, 'theme', '默认侧边栏风格', 'string', 'themeNavTheme', 'light', 'dark', 70, '', 1, 1, '2021-01-30 13:27:43', '2022-09-05 20:29:05'), (3, 'theme', '默认侧边栏风格', 'string', 'themeNavTheme', 'light', 'dark', 70, '', 1, 1, '2021-01-30 13:27:43', '2022-09-05 20:29:05'),
(4, 'basic', '用户是否可注册开关', 'int', 'basicRegisterSwitch', '1', '1', 80, '', 1, 1, '2021-09-29 23:51:21', '2023-04-30 20:38:06'),
(5, 'basic', '验证码开关', 'int', 'basicCaptchaSwitch', '1', '1', 90, '', 1, 1, '2021-09-29 23:51:21', '2023-04-30 20:38:06'),
(6, 'basic', '网站名称', 'string', 'basicName', 'HotGo', 'HotGo!', 10, '', 1, 1, '2021-01-30 13:27:43', '2023-04-30 20:38:06'), (6, 'basic', '网站名称', 'string', 'basicName', 'HotGo', 'HotGo!', 10, '', 1, 1, '2021-01-30 13:27:43', '2023-04-30 20:38:06'),
(7, 'basic', '网站logo', 'string', 'basicLogo', 'http://bufanyun.cn-bj.ufileos.com/hotgo/attachment/2023-02-09/cqdq8er9nfkchdopav.png', '', 20, '首页使用', 1, 1, '2021-01-30 13:27:43', '2023-04-30 20:38:06'), (7, 'basic', '网站logo', 'string', 'basicLogo', 'http://bufanyun.cn-bj.ufileos.com/hotgo/attachment/2023-02-09/cqdq8er9nfkchdopav.png', '', 20, '首页使用', 1, 1, '2021-01-30 13:27:43', '2023-04-30 20:38:06'),
(8, 'basic', '网站备案号', 'string', 'basicIcpCode', '豫ICP备16035288号', '', 30, '', 1, 1, '2021-01-30 13:27:43', '2023-04-30 20:38:06'), (8, 'basic', '网站备案号', 'string', 'basicIcpCode', '豫ICP备16035288号', '', 30, '', 1, 1, '2021-01-30 13:27:43', '2023-04-30 20:38:06'),
@ -1363,7 +1367,17 @@ INSERT INTO `hg_sys_config` (`id`, `group`, `name`, `type`, `key`, `value`, `def
(108, 'wechat', '开放平台AppId', 'string', 'openPlatformAppId', '', '', 1040, '请填写微信开放平台平台后台的AppId', 1, 1, '2021-01-30 13:27:43', '2023-04-30 22:26:12'), (108, 'wechat', '开放平台AppId', 'string', 'openPlatformAppId', '', '', 1040, '请填写微信开放平台平台后台的AppId', 1, 1, '2021-01-30 13:27:43', '2023-04-30 22:26:12'),
(109, 'wechat', '开放平台AppSecret', 'string', 'openPlatformAppSecret', '', '', 1050, '请填写微信开放平台平台后台的AppSecret', 1, 1, '2021-01-30 13:27:43', '2023-04-30 22:26:12'), (109, 'wechat', '开放平台AppSecret', 'string', 'openPlatformAppSecret', '', '', 1050, '请填写微信开放平台平台后台的AppSecret', 1, 1, '2021-01-30 13:27:43', '2023-04-30 22:26:12'),
(110, 'wechat', '开放平台EncodingAESKey', 'string', 'openPlatformEncodingAESKey', '', '', 1060, '与开放平台接入设置值一致必须为英文或者数字长度为43个字符. 请妥善保管,EncodingAESKey 泄露将可能被窃取或篡改平台的操作数据', 1, 1, '2021-01-30 13:27:43', '2023-04-30 22:26:12'), (110, 'wechat', '开放平台EncodingAESKey', 'string', 'openPlatformEncodingAESKey', '', '', 1060, '与开放平台接入设置值一致必须为英文或者数字长度为43个字符. 请妥善保管,EncodingAESKey 泄露将可能被窃取或篡改平台的操作数据', 1, 1, '2021-01-30 13:27:43', '2023-04-30 22:26:12'),
(111, 'wechat', '开放平台token', 'string', 'openPlatformToken', '', '', 1070, '', 1, 1, '2021-01-30 13:27:43', '2023-04-30 22:26:12'); (111, 'wechat', '开放平台token', 'string', 'openPlatformToken', '', '', 1070, '', 1, 1, '2021-01-30 13:27:43', '2023-04-30 22:26:12'),
(112, 'login', '注册开关', 'int', 'loginRegisterSwitch', '1', '1', 1100, '', 1, 1, '2021-09-29 23:51:21', '2023-05-15 09:46:09'),
(113, 'login', '验证码开关', 'int', 'loginCaptchaSwitch', '1', '1', 1110, '', 1, 1, '2021-09-29 23:51:21', '2023-05-15 09:46:09'),
(114, 'login', '用户协议', 'string', 'loginProtocol', '<p><span style=\"color: rgb(31, 34, 37);\">用户协议..</span></p>', '', 1120, '', 1, 1, '2021-09-29 23:51:21', '2023-05-15 09:46:09'),
(115, 'login', '隐私权政策', 'string', 'loginPolicy', '<p><span style=\"color: rgb(31, 34, 37);\">隐私权政策..</span></p>', '', 1130, '', 1, 1, '2021-09-29 23:51:21', '2023-05-15 09:46:09'),
(116, 'login', '默认注册角色', 'int64', 'loginRoleId', '202', '', 1140, '', 1, 1, '2021-09-29 23:51:21', '2023-05-15 09:46:09'),
(117, 'login', '默认注册部门', 'int64', 'loginDeptId', '112', '', 1150, '', 1, 1, '2021-09-29 23:51:21', '2023-05-15 09:46:09'),
(118, 'login', '默认注册岗位', '[]int64', 'loginPostIds', '[6]', '', 1160, '', 1, 1, '2021-09-29 23:51:21', '2023-05-15 09:46:09'),
(119, 'login', '默认注册头像', 'string', 'loginAvatar', 'http://localhost:8000/attachment/2023-05-14/csltf747yrr4gd4kc5.png', '', 1170, '', 1, 1, '2021-09-29 23:51:21', '2023-05-15 09:46:09'),
(120, 'login', '强制邀请', 'int', 'loginForceInvite', '2', '1', 1190, '', 1, 1, '2021-09-29 23:51:21', '2023-05-15 09:46:09'),
(121, 'login', '自动获取openId', 'int', 'loginAutoOpenId', '2', '1', 1195, '', 1, 1, '2021-09-29 23:51:21', '2023-05-15 09:46:09');
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -1715,13 +1729,6 @@ CREATE TABLE `hg_sys_login_log` (
`updated_at` datetime DEFAULT NULL COMMENT '修改时间' `updated_at` datetime DEFAULT NULL COMMENT '修改时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统_登录日志'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统_登录日志';
--
-- 转存表中的数据 `hg_sys_login_log`
--
INSERT INTO `hg_sys_login_log` (`id`, `req_id`, `member_id`, `username`, `response`, `login_at`, `login_ip`, `err_msg`, `status`, `created_at`, `updated_at`) VALUES
(40, 'c043b70bb0045e17d7eafe258038334d', 1, 'admin', '{\"id\": 1, \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHAiOiJhZG1pbiIsImF2YXRhciI6Imh0dHA6Ly9idWZhbnl1bi5jbi1iai51ZmlsZW9zLmNvbS9ob3Rnby9hdHRhY2htZW50LzIwMjMtMDItMDkvY3FkcThlcjluZmtjaGRvcGF2LnBuZyIsImRlcHRJZCI6MTAwLCJlbWFpbCI6IjEzMzgxNDI1MEBxcS5jb20iLCJleHAiOjE2ODQ2NTI0NjQsImV4cGlyZXMiOjg2NDAwMCwiaWQiOjEsImlzUmVmcmVzaCI6ZmFsc2UsImp3dFZlcnNpb24iOiIxLjAiLCJtb2JpbGUiOiIxNTMwMzgzMDU3MSIsInBpZCI6MCwicmVhbE5hbWUiOiLlrZ_luIUiLCJyb2xlSWQiOjEsInJvbGVLZXkiOiJzdXBlciIsInVzZXJuYW1lIjoiYWRtaW4ifQ.66ppHKrI8QbIo4u_fH88BlI6NdiomqnuIVGkyDKy1-I\", \"expires\": 864000}', '2023-05-11 15:01:04', '127.0.0.1', '', 1, '2023-05-11 15:41:45', '2023-05-11 15:41:45');
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
@ -5469,7 +5476,7 @@ CREATE TABLE `hg_sys_serve_license` (
-- --
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 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, 'cron', '默认的定时任务', '1002', 'hotgo', '这是默认的定时任务TCP客户端授权凭证', '127.0.0.1:52537', 1, 1, 163, '2023-05-11 15:52:56', '2023-05-11 15:54:30', NULL, '127.0.0.1', '2033-03-09 00:00:00', '', 1, '2023-03-11 00:00:00', '2023-05-11 15:54:30'), (1, 'cron', '默认的定时任务', '1002', 'hotgo', '这是默认的定时任务TCP客户端授权凭证', '127.0.0.1:62905', 1, 1, 295, '2023-05-14 16:44:30', '2023-05-14 16:50:30', NULL, '127.0.0.1', '2033-03-09 00:00:00', '', 1, '2023-03-11 00:00:00', '2023-05-14 16:50:30'),
(2, 'auth', '测试授权', 'mengshuai', '123456', '这是一个测试的授权服务可以为第三方平台提供授权支持', '127.0.0.1:51615', 1, 1, 0, '2023-05-04 23:23:52', '2023-05-04 23:23:52', NULL, '127.0.0.1', '2033-03-09 00:00:00', '', 1, '2023-03-11 00:00:00', '2023-05-04 23:23:52'); (2, 'auth', '测试授权', 'mengshuai', '123456', '这是一个测试的授权服务可以为第三方平台提供授权支持', '127.0.0.1:51615', 1, 1, 0, '2023-05-04 23:23:52', '2023-05-04 23:23:52', NULL, '127.0.0.1', '2033-03-09 00:00:00', '', 1, '2023-03-11 00:00:00', '2023-05-04 23:23:52');
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -5586,6 +5593,7 @@ ALTER TABLE `hg_admin_dept`
-- --
ALTER TABLE `hg_admin_member` ALTER TABLE `hg_admin_member`
ADD PRIMARY KEY (`id`), ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `invite_code` (`invite_code`),
ADD KEY `dept_id` (`dept_id`), ADD KEY `dept_id` (`dept_id`),
ADD KEY `pid` (`pid`); ADD KEY `pid` (`pid`);
@ -5846,7 +5854,7 @@ 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=10; MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '管理员ID', AUTO_INCREMENT=14;
-- --
-- 使用表AUTO_INCREMENT `hg_admin_menu` -- 使用表AUTO_INCREMENT `hg_admin_menu`
@ -5894,7 +5902,7 @@ ALTER TABLE `hg_admin_role`
-- 使用表AUTO_INCREMENT `hg_admin_role_casbin` -- 使用表AUTO_INCREMENT `hg_admin_role_casbin`
-- --
ALTER TABLE `hg_admin_role_casbin` ALTER TABLE `hg_admin_role_casbin`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20237; MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28232;
-- --
-- 使用表AUTO_INCREMENT `hg_pay_log` -- 使用表AUTO_INCREMENT `hg_pay_log`
@ -5924,7 +5932,7 @@ ALTER TABLE `hg_sys_addons_install`
-- 使用表AUTO_INCREMENT `hg_sys_attachment` -- 使用表AUTO_INCREMENT `hg_sys_attachment`
-- --
ALTER TABLE `hg_sys_attachment` ALTER TABLE `hg_sys_attachment`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '文件ID', AUTO_INCREMENT=55; MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '文件ID', AUTO_INCREMENT=56;
-- --
-- 使用表AUTO_INCREMENT `hg_sys_blacklist` -- 使用表AUTO_INCREMENT `hg_sys_blacklist`
@ -5936,7 +5944,7 @@ ALTER TABLE `hg_sys_blacklist`
-- 使用表AUTO_INCREMENT `hg_sys_config` -- 使用表AUTO_INCREMENT `hg_sys_config`
-- --
ALTER TABLE `hg_sys_config` ALTER TABLE `hg_sys_config`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '配置ID', AUTO_INCREMENT=112; MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '配置ID', AUTO_INCREMENT=122;
-- --
-- 使用表AUTO_INCREMENT `hg_sys_cron` -- 使用表AUTO_INCREMENT `hg_sys_cron`
@ -5990,7 +5998,7 @@ ALTER TABLE `hg_sys_log`
-- 使用表AUTO_INCREMENT `hg_sys_login_log` -- 使用表AUTO_INCREMENT `hg_sys_login_log`
-- --
ALTER TABLE `hg_sys_login_log` ALTER TABLE `hg_sys_login_log`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '日志ID', AUTO_INCREMENT=41; MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '日志ID';
-- --
-- 使用表AUTO_INCREMENT `hg_sys_serve_license` -- 使用表AUTO_INCREMENT `hg_sys_serve_license`
@ -6008,7 +6016,7 @@ ALTER TABLE `hg_sys_serve_log`
-- 使用表AUTO_INCREMENT `hg_sys_sms_log` -- 使用表AUTO_INCREMENT `hg_sys_sms_log`
-- --
ALTER TABLE `hg_sys_sms_log` ALTER TABLE `hg_sys_sms_log`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=3; MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=6;
-- --
-- 使用表AUTO_INCREMENT `hg_test_category` -- 使用表AUTO_INCREMENT `hg_test_category`

View File

@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI // @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com> // @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE // @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package file package file
import ( import (
@ -11,7 +10,7 @@ import (
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp" "github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/text/gstr" "github.com/gogf/gf/v2/text/gstr"
"io/ioutil" "io"
"path" "path"
) )
@ -139,7 +138,7 @@ func UploadFileByte(file *ghttp.UploadFile) (b []byte, err error) {
if err != nil { if err != nil {
return return
} }
all, err := ioutil.ReadAll(open) all, err := io.ReadAll(open)
if err != nil { if err != nil {
return return
} }

View File

@ -2,10 +2,8 @@
VITE_PORT=8001 VITE_PORT=8001
# spa-title # spa-title
VITE_GLOB_APP_TITLE=HG后台管理系统 VITE_GLOB_APP_TITLE=HotGo管理系统
# spa shortname # spa shortname
VITE_GLOB_APP_SHORT_NAME=HG VITE_GLOB_APP_SHORT_NAME=HG
# 生产环境 开启mock
VITE_GLOB_PROD_MOCK=false

View File

@ -3,9 +3,6 @@
# 网站根目录 # 网站根目录
VITE_PUBLIC_PATH=/ VITE_PUBLIC_PATH=/
# 是否开启mock
VITE_USE_MOCK=false
# 网站前缀 # 网站前缀
VITE_BASE_URL=/ VITE_BASE_URL=/

View File

@ -3,9 +3,6 @@
# 网站根目录 # 网站根目录
VITE_PUBLIC_PATH=/admin VITE_PUBLIC_PATH=/admin
# 是否开启mock
VITE_USE_MOCK=false
# 网站前缀 # 网站前缀
VITE_BASE_URL=/ VITE_BASE_URL=/

View File

@ -4,13 +4,11 @@ import { NaiveUiResolver } from 'unplugin-vue-components/resolvers';
import topLevelAwait from 'vite-plugin-top-level-await'; import topLevelAwait from 'vite-plugin-top-level-await';
import vue from '@vitejs/plugin-vue'; import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx'; import vueJsx from '@vitejs/plugin-vue-jsx';
import { configHtmlPlugin } from './html'; import { configHtmlPlugin } from './html';
import { configMockPlugin } from './mock';
import { configCompressPlugin } from './compress'; import { configCompressPlugin } from './compress';
export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean, prodMock) { export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
const { VITE_USE_MOCK, VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE } = viteEnv; const { VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE } = viteEnv;
const vitePlugins: (Plugin | Plugin[])[] = [ const vitePlugins: (Plugin | Plugin[])[] = [
// have to // have to
@ -36,9 +34,6 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean, prodMock)
// vite-plugin-html // vite-plugin-html
vitePlugins.push(configHtmlPlugin(viteEnv, isBuild)); vitePlugins.push(configHtmlPlugin(viteEnv, isBuild));
// vite-plugin-mock
VITE_USE_MOCK && vitePlugins.push(configMockPlugin(isBuild, prodMock));
if (isBuild) { if (isBuild) {
// rollup-plugin-gzip // rollup-plugin-gzip
vitePlugins.push( vitePlugins.push(

View File

@ -1,19 +0,0 @@
/**
* Mock plugin for development and production.
* https://github.com/anncwb/vite-plugin-mock
*/
import { viteMockServe } from 'vite-plugin-mock';
export function configMockPlugin(isBuild: boolean, prodMock: boolean) {
return viteMockServe({
ignore: /^\_/,
mockPath: 'mock',
localEnabled: !isBuild,
prodEnabled: isBuild && prodMock,
injectCode: `
import { setupProdMockServer } from '../mock/_createProductionServer';
setupProdMockServer();
`,
});
}

View File

@ -1,18 +0,0 @@
import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer';
const modules = import.meta.globEager('./**/*.ts');
const mockModules: any[] = [];
Object.keys(modules).forEach((key) => {
if (key.includes('/_')) {
return;
}
mockModules.push(...modules[key].default);
});
/**
* Used in a production environment. Need to manually import all modules
*/
export function setupProdMockServer() {
createProdMockServer(mockModules);
}

View File

@ -1,73 +0,0 @@
import Mock from 'mockjs';
export function resultSuccess(data, { message = 'ok' } = {}) {
return Mock.mock({
code: 0,
data,
message,
type: 'success',
});
}
export function resultPageSuccess<T = any>(
page: number,
pageSize: number,
list: T[],
{ message = 'ok' } = {}
) {
const pageData = pagination(page, pageSize, list);
return {
...resultSuccess({
page,
pageSize,
pageCount: list.length,
list: pageData,
}),
message,
};
}
export function resultError(message = 'Request failed', { code = -1, result = null } = {}) {
return {
code,
result,
message,
type: 'error',
};
}
export function pagination<T = any>(pageNo: number, pageSize: number, array: T[]): T[] {
const offset = (pageNo - 1) * Number(pageSize);
const ret =
offset + Number(pageSize) >= array.length
? array.slice(offset, array.length)
: array.slice(offset, offset + Number(pageSize));
return ret;
}
/**
* @param {Number} times
* @param {Function} callback
*/
export function doCustomTimes(times: number, callback: any) {
let i = -1;
while (++i < times) {
callback(i);
}
}
export interface requestParams {
method: string;
body: any;
headers?: { token?: string };
query: any;
}
/**
* @description request数据中获取token
*
*/
export function getRequestToken({ headers }: requestParams): string | undefined {
return headers?.token;
}

View File

@ -1,44 +0,0 @@
import { Random } from 'mockjs';
import { resultSuccess } from '../_util';
const consoleInfo = {
//访问量
visits: {
dayVisits: Random.float(10000, 99999, 2, 2),
rise: Random.float(10, 99),
decline: Random.float(10, 99),
amount: Random.float(99999, 999999, 3, 5),
},
//销售额
saleroom: {
weekSaleroom: Random.float(10000, 99999, 2, 2),
amount: Random.float(99999, 999999, 2, 2),
degree: Random.float(10, 99),
},
//订单量
orderLarge: {
weekLarge: Random.float(10000, 99999, 2, 2),
rise: Random.float(10, 99),
decline: Random.float(10, 99),
amount: Random.float(99999, 999999, 2, 2),
},
//成交额度
volume: {
weekLarge: Random.float(10000, 99999, 2, 2),
rise: Random.float(10, 99),
decline: Random.float(10, 99),
amount: Random.float(99999, 999999, 2, 2),
},
};
export default [
//主控台 卡片数据
{
url: '/admin/dashboard/console',
timeout: 1000,
method: 'get',
response: () => {
return resultSuccess(consoleInfo);
},
},
];

View File

@ -1,89 +0,0 @@
import { resultSuccess } from '../_util';
const menuList = () => {
const result: any[] = [
{
label: 'Dashboard',
key: 'dashboard',
type: 1,
subtitle: 'dashboard',
openType: 1,
auth: 'dashboard',
path: '/dashboard',
children: [
{
label: '主控台',
key: 'console',
type: 1,
subtitle: 'console',
openType: 1,
auth: 'console',
path: '/dashboard/console',
},
{
label: '工作台',
key: 'workplace',
type: 1,
subtitle: 'workplace',
openType: 1,
auth: 'workplace',
path: '/dashboard/workplace',
},
],
},
{
label: '表单管理',
key: 'form',
type: 1,
subtitle: 'form',
openType: 1,
auth: 'form',
path: '/form',
children: [
{
label: '基础表单',
key: 'basic-form',
type: 1,
subtitle: 'basic-form',
openType: 1,
auth: 'basic-form',
path: '/form/basic-form',
},
{
label: '分步表单',
key: 'step-form',
type: 1,
subtitle: 'step-form',
openType: 1,
auth: 'step-form',
path: '/form/step-form',
},
{
label: '表单详情',
key: 'detail',
type: 1,
subtitle: 'detail',
openType: 1,
auth: 'detail',
path: '/form/detail',
},
],
},
];
return result;
};
export default [
{
url: '/admin/menu/list',
timeout: 1000,
method: 'get',
response: () => {
const list = menuList();
return resultSuccess({
list,
});
},
},
];

View File

@ -1,46 +0,0 @@
import { doCustomTimes, resultSuccess } from '../_util';
function getMenuKeys() {
const keys = ['dashboard', 'console', 'workplace', 'basic-form', 'step-form', 'detail'];
const newKeys = [];
doCustomTimes(parseInt(Math.random() * 6), () => {
const key = keys[Math.floor(Math.random() * keys.length)];
// @ts-ignore
newKeys.push(key);
});
return Array.from(new Set(newKeys));
}
const roleList = (pageSize) => {
const result: any[] = [];
doCustomTimes(pageSize, () => {
result.push({
id: '@integer(10,100)',
name: '@cname()',
explain: '@cname()',
isDefault: '@boolean()',
menu_keys: getMenuKeys(),
create_date: `@date('yyyy-MM-dd hh:mm:ss')`,
'status|1': ['normal', 'enable', 'disable'],
});
});
return result;
};
export default [
{
url: '/admin/role/list',
timeout: 1000,
method: 'get',
response: ({ query }) => {
const { page = 1, pageSize = 10 } = query;
const list = roleList(Number(pageSize));
return resultSuccess({
page: Number(page),
pageSize: Number(pageSize),
pageCount: 60,
list,
});
},
},
];

View File

@ -1,40 +0,0 @@
import { Random } from 'mockjs';
import { doCustomTimes, resultSuccess } from '../_util';
const tableList = (pageSize) => {
const result: any[] = [];
doCustomTimes(pageSize, () => {
result.push({
id: '@integer(10,999999)',
beginTime: '@datetime',
endTime: '@datetime',
address: '@city()',
name: '@cname()',
avatar: Random.image('400x400', Random.color(), Random.color(), Random.first()),
date: `@date('yyyy-MM-dd')`,
time: `@time('HH:mm')`,
'no|100000-10000000': 100000,
'status|1': [true, false],
});
});
return result;
};
export default [
//表格数据列表
{
url: '/admin/table/list',
timeout: 1000,
method: 'get',
response: ({ query }) => {
const { page = 1, pageSize = 10 } = query;
const list = tableList(Number(pageSize));
return resultSuccess({
page: Number(page),
pageSize: Number(pageSize),
pageCount: 60,
list,
});
},
},
];

View File

@ -1,53 +0,0 @@
import { resultSuccess } from '../_util';
import { ApiEnum } from '@/enums/apiEnum';
const menusList = [
{
path: '/dashboard',
name: 'Dashboard',
component: 'LAYOUT',
redirect: '/dashboard/console',
meta: {
icon: 'DashboardOutlined',
title: 'Dashboard',
},
children: [
{
path: 'console',
name: 'dashboard_console',
component: '/dashboard/console/console',
meta: {
title: '主控台',
},
},
{
path: 'monitor',
name: 'dashboard_monitor',
component: '/dashboard/monitor/monitor',
meta: {
title: '监控页',
},
},
{
path: 'workplace',
name: 'dashboard_workplace',
component: '/dashboard/workplace/workplace',
meta: {
hidden: true,
title: '工作台',
},
},
],
},
];
export default [
{
url: ApiEnum.RoleDynamic,
timeout: 1000,
method: 'get',
response: () => {
return resultSuccess(menusList);
},
},
];

View File

@ -1,60 +0,0 @@
import Mock from 'mockjs';
import { ApiEnum } from '@/enums/apiEnum';
import { resultSuccess } from '../_util';
const Random = Mock.Random;
const token = Random.string('upper', 32, 32);
const adminInfo = {
userId: '1',
username: 'admin',
realName: 'Admin',
avatar: Random.image(),
desc: 'manager',
password: Random.string('upper', 4, 16),
token,
permissions: [
{
label: '主控台',
value: 'dashboard_console',
},
{
label: '监控页',
value: 'dashboard_monitor',
},
{
label: '工作台',
value: 'dashboard_workplace',
},
{
label: '基础列表',
value: 'basic_list',
},
{
label: '基础列表删除',
value: 'basic_list_delete',
},
],
};
export default [
{
url: ApiEnum.SiteLogin,
timeout: 1000,
method: 'post',
response: () => {
return resultSuccess({ token });
},
},
{
url: ApiEnum.MemberInfo, //ApiEnum.Prefix +
timeout: 1000,
method: 'get',
response: () => {
// const token = getRequestToken(request);
// if (!token) return resultError('Invalid token');
return resultSuccess(adminInfo);
},
},
];

View File

@ -1,6 +1,6 @@
{ {
"name": "hotgo", "name": "hotgo",
"version": "2.6.10", "version": "2.7.3",
"author": { "author": {
"name": "MengShuai", "name": "MengShuai",
"email": "133814250@qq.com", "email": "133814250@qq.com",
@ -103,7 +103,6 @@
"vite": "^2.9.8", "vite": "^2.9.8",
"vite-plugin-compression": "^0.3.6", "vite-plugin-compression": "^0.3.6",
"vite-plugin-html": "^2.1.2", "vite-plugin-html": "^2.1.2",
"vite-plugin-mock": "^2.9.6",
"vite-plugin-require-transform": "^1.0.5", "vite-plugin-require-transform": "^1.0.5",
"vite-plugin-style-import": "^1.4.1", "vite-plugin-style-import": "^1.4.1",
"vite-plugin-top-level-await": "^1.2.2", "vite-plugin-top-level-await": "^1.2.2",

View File

@ -77,6 +77,14 @@ export function SendBindSms() {
}); });
} }
export function SendSms(params) {
return http.request({
url: '/sms/send',
method: 'post',
params,
});
}
export function updateMemberCash(params) { export function updateMemberCash(params) {
return http.request({ return http.request({
url: '/member/updateCash', url: '/member/updateCash',
@ -85,13 +93,55 @@ export function updateMemberCash(params) {
}); });
} }
/**
* @description:
*/
export function getLoginConfig() {
return http.request<BasicResponseModel>({
url: ApiEnum.SiteLoginConfig,
method: 'get',
});
}
/**
* @description:
*/
export function register(params) {
return http.request<BasicResponseModel>(
{
url: ApiEnum.SiteRegister,
method: 'POST',
params,
},
{
isTransformResponse: false,
}
);
}
/** /**
* @description: * @description:
*/ */
export function login(params) { export function login(params) {
return http.request<BasicResponseModel>( return http.request<BasicResponseModel>(
{ {
url: ApiEnum.SiteLogin, url: ApiEnum.SiteAccountLogin,
method: 'POST',
params,
},
{
isTransformResponse: false,
}
);
}
/**
* @description:
*/
export function mobileLogin(params) {
return http.request<BasicResponseModel>(
{
url: ApiEnum.SiteMobileLogin,
method: 'POST', method: 'POST',
params, params,
}, },

View File

@ -1,10 +0,0 @@
import { http } from '@/utils/http/axios';
//获取table
export function getTableList(params) {
return http.request({
url: '/table/list',
method: 'get',
params,
});
}

View File

@ -3,7 +3,10 @@ export enum ApiEnum {
Prefix = '/api', Prefix = '/api',
// 基础 // 基础
SiteLogin = '/site/login', // 登录 SiteRegister = '/site/register', // 账号注册
SiteAccountLogin = '/site/accountLogin', // 账号登录
SiteMobileLogin = '/site/mobileLogin', // 手机号登录
SiteLoginConfig = '/site/loginConfig', // 登录配置
SiteLogout = '/site/logout', // 注销 SiteLogout = '/site/logout', // 注销
SiteConfig = '/site/config', // 配置信息 SiteConfig = '/site/config', // 配置信息

View File

@ -1,5 +1,4 @@
import type { GlobConfig } from '/#/config'; import type { GlobConfig } from '/#/config';
import { warn } from '@/utils/log'; import { warn } from '@/utils/log';
import { getAppEnvConfig } from '@/utils/env'; import { getAppEnvConfig } from '@/utils/env';
@ -10,7 +9,6 @@ export const useGlobSetting = (): Readonly<GlobConfig> => {
VITE_GLOB_APP_SHORT_NAME, VITE_GLOB_APP_SHORT_NAME,
VITE_GLOB_API_URL_PREFIX, VITE_GLOB_API_URL_PREFIX,
VITE_GLOB_UPLOAD_URL, VITE_GLOB_UPLOAD_URL,
VITE_GLOB_PROD_MOCK,
VITE_GLOB_IMG_URL, VITE_GLOB_IMG_URL,
} = getAppEnvConfig(); } = getAppEnvConfig();
@ -27,7 +25,6 @@ export const useGlobSetting = (): Readonly<GlobConfig> => {
shortName: VITE_GLOB_APP_SHORT_NAME, shortName: VITE_GLOB_APP_SHORT_NAME,
urlPrefix: VITE_GLOB_API_URL_PREFIX, urlPrefix: VITE_GLOB_API_URL_PREFIX,
uploadUrl: VITE_GLOB_UPLOAD_URL, uploadUrl: VITE_GLOB_UPLOAD_URL,
prodMock: VITE_GLOB_PROD_MOCK,
imgUrl: VITE_GLOB_IMG_URL, imgUrl: VITE_GLOB_IMG_URL,
}; };
return glob as Readonly<GlobConfig>; return glob as Readonly<GlobConfig>;

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="logo"> <div class="logo">
<img src="~@/assets/images/logo.png" alt="" :class="{ 'mr-2': !collapsed }" /> <img src="~@/assets/images/logo.png" alt="" :class="{ 'mr-2': !collapsed }" />
<h2 v-show="!collapsed" class="title">HG后台管理系统</h2> <h2 v-show="!collapsed" class="title">{{ projectName }}</h2>
</div> </div>
</template> </template>
@ -13,6 +13,12 @@
type: Boolean, type: Boolean,
}, },
}, },
setup() {
const projectName = import.meta.env.VITE_GLOB_APP_TITLE;
return {
projectName,
};
},
}; };
</script> </script>

Some files were not shown because too many files have changed in this diff Show More