更新2.1.2版本,优化部门、角色权限,增加上下级关系;增加登录、系统、短信日志;优化省市区编码

This commit is contained in:
孟帅
2023-01-25 11:49:21 +08:00
parent 11fad0132d
commit 93e0fe7250
190 changed files with 35896 additions and 7208 deletions

View File

@@ -32,12 +32,12 @@ type LoginReq struct {
g.Meta `path:"/site/login" method:"post" tags:"后台基础" summary:"账号登录"`
Username string `json:"username" v:"required#用户名不能为空" dc:"用户名"`
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
//Cid string `json:"cid" v:"required#验证码ID不能为空" dc:"验证码ID"`
//Code string `json:"code" v:"required#验证码不能为空" dc:"验证码"`
//Device string `json:"device" dc:"登录设备"`
Cid string `json:"cid" dc:"验证码ID"`
Code string `json:"code" dc:"验证码"`
IsLock bool `json:"isLock" dc:"是否为锁屏状态"`
}
type LoginRes struct {
adminin.MemberLoginModel
*adminin.MemberLoginModel
}
// SiteConfigReq 获取配置

View File

@@ -0,0 +1,19 @@
// Package common
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package common
import "github.com/gogf/gf/v2/frame/g"
// SendTestSmsReq 发送测试短信
type SendTestSmsReq struct {
Event string `json:"event" v:"required#事件模板不能为空" dc:"事件模板"`
Mobile string `json:"mobile" v:"required#接收手机号不能为空" dc:"接收手机号"`
Code string `json:"code" v:"required#接收验证码不能为空" dc:"接收验证码"`
g.Meta `path:"/sms/sendTest" tags:"短信" method:"post" summary:"发送测试短信"`
}
type SendTestSmsRes struct {
}

View File

@@ -66,3 +66,10 @@ type StatusReq struct {
g.Meta `path:"/cron/status" method:"post" tags:"定时任务" summary:"更新定时任务状态"`
}
type StatusRes struct{}
// OnlineExecReq 在线执行
type OnlineExecReq struct {
g.Meta `path:"/cron/onlineExec" method:"post" tags:"定时任务" summary:"在线执行"`
sysin.OnlineExecInp
}
type OnlineExecRes struct{}

View File

@@ -20,7 +20,7 @@ type GroupListReq struct {
form.StatusReq
Title string `json:"title"`
Content string `json:"content"`
g.Meta `path:"/cron_group/list" method:"get" tags:"定时任务分组" summary:"获取定时任务分组列表"`
g.Meta `path:"/cronGroup/list" method:"get" tags:"定时任务分组" summary:"获取定时任务分组列表"`
}
type GroupListRes struct {
@@ -31,7 +31,7 @@ type GroupListRes struct {
// GroupViewReq 获取信息
type GroupViewReq struct {
Id int64 `json:"id" v:"required#定时任务分组ID不能为空" dc:"定时任务分组ID"`
g.Meta `path:"/cron_group/view" method:"get" tags:"定时任务分组" summary:"获取指定信息"`
g.Meta `path:"/cronGroup/view" method:"get" tags:"定时任务分组" summary:"获取指定信息"`
}
type GroupViewRes struct {
*sysin.CronGroupViewModel
@@ -40,21 +40,21 @@ type GroupViewRes struct {
// GroupEditReq 修改/新增
type GroupEditReq struct {
entity.SysCronGroup
g.Meta `path:"/cron_group/edit" method:"post" tags:"定时任务分组" summary:"修改/新增定时任务分组"`
g.Meta `path:"/cronGroup/edit" method:"post" tags:"定时任务分组" summary:"修改/新增定时任务分组"`
}
type GroupEditRes struct{}
// GroupDeleteReq 删除
type GroupDeleteReq struct {
Id interface{} `json:"id" v:"required#定时任务分组ID不能为空" dc:"定时任务分组ID"`
g.Meta `path:"/cron_group/delete" method:"post" tags:"定时任务分组" summary:"删除定时任务分组"`
g.Meta `path:"/cronGroup/delete" method:"post" tags:"定时任务分组" summary:"删除定时任务分组"`
}
type GroupDeleteRes struct{}
// GroupMaxSortReq 最大排序
type GroupMaxSortReq struct {
Id int64 `json:"id" dc:"定时任务分组ID"`
g.Meta `path:"/cron_group/max_sort" method:"get" tags:"定时任务分组" summary:"定时任务分组最大排序"`
g.Meta `path:"/cronGroup/max_sort" method:"get" tags:"定时任务分组" summary:"定时任务分组最大排序"`
}
type GroupMaxSortRes struct {
Sort int `json:"sort" dc:"排序"`
@@ -63,13 +63,13 @@ type GroupMaxSortRes struct {
// GroupStatusReq 更新状态
type GroupStatusReq struct {
entity.SysCronGroup
g.Meta `path:"/cron_group/status" method:"post" tags:"定时任务分组" summary:"更新定时任务分组状态"`
g.Meta `path:"/cronGroup/status" method:"post" tags:"定时任务分组" summary:"更新定时任务分组状态"`
}
type GroupStatusRes struct{}
// GroupSelectReq 定时任务分组选项
type GroupSelectReq struct {
g.Meta `path:"/cron_group/select" method:"get" tags:"定时任务分组" summary:"定时任务分组选项"`
g.Meta `path:"/cronGroup/select" method:"get" tags:"定时任务分组" summary:"定时任务分组选项"`
}
type GroupSelectRes sysin.DictTypeSelectModel

View File

@@ -0,0 +1,50 @@
// Package loginlog
// @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 loginlog
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// ListReq 查询登录日志列表
type ListReq struct {
g.Meta `path:"/loginLog/list" method:"get" tags:"登录日志" summary:"获取登录日志列表"`
sysin.LoginLogListInp
}
type ListRes struct {
form.PageRes
List []*sysin.LoginLogListModel `json:"list" dc:"数据列表"`
}
// ExportReq 导出登录日志列表
type ExportReq struct {
g.Meta `path:"/loginLog/export" method:"get" tags:"登录日志" summary:"导出登录日志列表"`
sysin.LoginLogListInp
}
type ExportRes struct{}
// ViewReq 获取登录日志指定信息
type ViewReq struct {
g.Meta `path:"/loginLog/view" method:"get" tags:"登录日志" summary:"获取登录日志指定信息"`
sysin.LoginLogViewInp
}
type ViewRes struct {
*sysin.LoginLogViewModel
}
// DeleteReq 删除登录日志
type DeleteReq struct {
g.Meta `path:"/loginLog/delete" method:"post" tags:"登录日志" summary:"删除登录日志"`
sysin.LoginLogDeleteInp
}
type DeleteRes struct{}

View File

@@ -106,7 +106,7 @@ type ListRes struct {
// ViewReq 获取指定信息
type ViewReq struct {
g.Meta `path:"/member/view" method:"get" tags:"会员" summary:"获取指定信息"`
Id int64 `json:"id" dc:"会员ID"` // v:"required#会员ID不能为空"
Id int64 `json:"id" dc:"会员ID"`
}
type ViewRes struct {
*adminin.MemberViewModel

View File

@@ -24,7 +24,8 @@ type OnlineListReq struct {
form.PageReq
form.RangeDateReq
form.StatusReq
UserId int64 `json:"userId" description:"用户ID"`
UserId int64 `json:"userId" description:"用户ID"`
Addr string `json:"addr" description:"登录地址"`
}
type OnlineListRes struct {

View File

@@ -39,25 +39,24 @@ type ViewRes struct {
// EditReq 修改/新增
type EditReq struct {
entity.SysProvinces
g.Meta `path:"/provinces/edit" method:"post" tags:"省市区" summary:"修改/新增省市区"`
sysin.ProvincesEditInp
}
type EditRes struct{}
// DeleteReq 删除
type DeleteReq struct {
Id interface{} `json:"id" v:"required#省市区ID不能为空" dc:"省市区ID"`
g.Meta `path:"/provinces/delete" method:"post" tags:"省市区" summary:"删除省市区"`
sysin.ProvincesDeleteInp
}
type DeleteRes struct{}
// MaxSortReq 最大排序
type MaxSortReq struct {
Id int64 `json:"id" dc:"省市区ID"`
g.Meta `path:"/provinces/max_sort" method:"get" tags:"省市区" summary:"省市区最大排序"`
g.Meta `path:"/provinces/maxSort" method:"get" tags:"省市区" summary:"省市区最大排序"`
}
type MaxSortRes struct {
Sort int `json:"sort" dc:"排序"`
*sysin.ProvincesMaxSortModel
}
// StatusReq 更新状态
@@ -66,3 +65,31 @@ type StatusReq struct {
g.Meta `path:"/provinces/status" method:"post" tags:"省市区" summary:"更新省市区状态"`
}
type StatusRes struct{}
// TreeReq 关系树选项列表
type TreeReq struct {
g.Meta `path:"/provinces/tree" tags:"省市区" method:"get" summary:"省市区关系树选项列表"`
}
type TreeRes struct {
List []map[string]interface{} `json:"list" dc:"数据列表"`
}
// ChildrenListReq 获取省市区下级列表
type ChildrenListReq struct {
g.Meta `path:"/provinces/childrenList" method:"get" tags:"省市区" summary:"获取省市区下级列表"`
sysin.ProvincesChildrenListInp
}
type ChildrenListRes struct {
List []*sysin.ProvincesChildrenListModel `json:"list" dc:"数据列表"`
form.PageRes
}
// UniqueIdReq 地区ID是否唯一
type UniqueIdReq struct {
g.Meta `path:"/provinces/uniqueId" method:"get" tags:"省市区" summary:"地区ID是否唯一"`
sysin.ProvincesUniqueIdInp
}
type UniqueIdRes struct {
*sysin.ProvincesUniqueIdModel
}

View File

@@ -52,7 +52,7 @@ type ListReq struct {
}
type ListRes struct {
List []*adminin.RoleListModel `json:"list" description:"数据列表"`
List []g.Map `json:"list" description:"数据列表"`
form.PageRes
}

View File

@@ -0,0 +1,50 @@
// Package servelog
// @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 servelog
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// ListReq 查询服务日志列表
type ListReq struct {
g.Meta `path:"/serveLog/list" method:"get" tags:"服务日志" summary:"获取服务日志列表"`
sysin.ServeLogListInp
}
type ListRes struct {
form.PageRes
List []*sysin.ServeLogListModel `json:"list" dc:"数据列表"`
}
// ExportReq 导出服务日志列表
type ExportReq struct {
g.Meta `path:"/serveLog/export" method:"get" tags:"服务日志" summary:"导出服务日志列表"`
sysin.ServeLogListInp
}
type ExportRes struct{}
// ViewReq 获取服务日志指定信息
type ViewReq struct {
g.Meta `path:"/serveLog/view" method:"get" tags:"服务日志" summary:"获取服务日志指定信息"`
sysin.ServeLogViewInp
}
type ViewRes struct {
*sysin.ServeLogViewModel
}
// DeleteReq 删除服务日志
type DeleteReq struct {
g.Meta `path:"/serveLog/delete" method:"post" tags:"服务日志" summary:"删除服务日志"`
sysin.ServeLogDeleteInp
}
type DeleteRes struct{}

View File

@@ -0,0 +1,69 @@
package smslog
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// ListReq 查询列表
type ListReq struct {
form.PageReq
form.RangeDateReq
form.StatusReq
Title string `json:"title"`
Content string `json:"content"`
g.Meta `path:"/smsLog/list" method:"get" tags:"短信记录" summary:"获取短信记录列表"`
}
type ListRes struct {
List []*sysin.SmsLogListModel `json:"list" dc:"数据列表"`
form.PageRes
}
// ViewReq 获取指定信息
type ViewReq struct {
Id int64 `json:"id" v:"required#短信记录ID不能为空" dc:"短信记录ID"`
g.Meta `path:"/smsLog/view" method:"get" tags:"短信记录" summary:"获取指定信息"`
}
type ViewRes struct {
*sysin.SmsLogViewModel
}
// EditReq 修改/新增数据
type EditReq struct {
entity.SysSmsLog
g.Meta `path:"/smsLog/edit" method:"post" tags:"短信记录" summary:"修改/新增短信记录"`
}
type EditRes struct{}
// DeleteReq 删除
type DeleteReq struct {
Id interface{} `json:"id" v:"required#短信记录ID不能为空" dc:"短信记录ID"`
g.Meta `path:"/smsLog/delete" method:"post" tags:"短信记录" summary:"删除短信记录"`
}
type DeleteRes struct{}
// MaxSortReq 最大排序
type MaxSortReq struct {
Id int64 `json:"id" dc:"短信记录ID"`
g.Meta `path:"/smsLog/maxSort" method:"get" tags:"短信记录" summary:"短信记录最大排序"`
}
type MaxSortRes struct {
Sort int `json:"sort" dc:"排序"`
}
// StatusReq 更新状态
type StatusReq struct {
entity.SysSmsLog
g.Meta `path:"/smsLog/status" method:"post" tags:"短信记录" summary:"更新短信记录状态"`
}
type StatusRes struct{}
// SendTestReq 更新状态
type SendTestReq struct {
entity.SysSmsLog
g.Meta `path:"/smsLog/sendTest" method:"post" tags:"短信记录" summary:"发送测试短信"`
}
type SendTestRes struct{}