mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-01-23 02:40:23 +08:00
增加用户上下文自动刷新,修复上传组件传参问题
This commit is contained in:
parent
5538d9b720
commit
4069411156
@ -26,7 +26,7 @@ type UserOnlineListReq struct {
|
||||
form.PageReq
|
||||
UserId int64 `json:"userId" description:"用户ID"`
|
||||
Username string `json:"username" description:"用户名"`
|
||||
Addr string `json:"addr" description:"登录地址"`
|
||||
IP string `json:"ip" description:"登录IP"`
|
||||
FirstTime []*gtime.Time `json:"firstTime" description:"登录时间"`
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ type UserOnlineListRes struct {
|
||||
|
||||
type UserOnlineModel struct {
|
||||
ID string `json:"id"` // 连接唯一标识
|
||||
Addr string `json:"addr"` // 客户端地址
|
||||
IP string `json:"ip"` // 客户端IP
|
||||
Os string `json:"os"` // 客户端系统名称
|
||||
Browser string `json:"browser"` // 浏览器
|
||||
FirstTime int64 `json:"firstTime"` // 首次连接时间
|
||||
|
@ -71,7 +71,7 @@ func (c *cMonitor) UserOnlineList(ctx context.Context, req *monitor.UserOnlineLi
|
||||
continue
|
||||
}
|
||||
|
||||
if req.Addr != "" && !gstr.Contains(conn.Addr, req.Addr) {
|
||||
if req.IP != "" && !gstr.Contains(conn.IP, req.IP) {
|
||||
continue
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ func (c *cMonitor) UserOnlineList(ctx context.Context, req *monitor.UserOnlineLi
|
||||
|
||||
clients = append(clients, &monitor.UserOnlineModel{
|
||||
ID: conn.ID,
|
||||
Addr: conn.Addr,
|
||||
IP: conn.IP,
|
||||
Os: useragent.GetOs(conn.UserAgent),
|
||||
Browser: useragent.GetBrowser(conn.UserAgent),
|
||||
FirstTime: conn.User.LoginAt.Unix(),
|
||||
@ -109,7 +109,7 @@ func (c *cMonitor) UserOnlineList(ctx context.Context, req *monitor.UserOnlineLi
|
||||
for k, v := range clients {
|
||||
if k >= offset && i <= perPage {
|
||||
if isDemo {
|
||||
v.Addr = consts.DemoTips
|
||||
v.IP = consts.DemoTips
|
||||
}
|
||||
res.List = append(res.List, v)
|
||||
i++
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
"github.com/gogf/gf/v2/util/grand"
|
||||
"hotgo/internal/consts"
|
||||
"hotgo/internal/dao"
|
||||
"hotgo/internal/library/contexts"
|
||||
"hotgo/internal/library/token"
|
||||
"hotgo/internal/model"
|
||||
"hotgo/internal/model/entity"
|
||||
@ -263,3 +264,51 @@ func (s *sAdminSite) handleLogin(ctx context.Context, mb *entity.AdminMember) (r
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// BindUserContext 绑定用户上下文
|
||||
func (s *sAdminSite) BindUserContext(ctx context.Context, claims *model.Identity) (err error) {
|
||||
var mb *entity.AdminMember
|
||||
if err = g.Model("admin_member").Ctx(ctx).Where("id", claims.Id).Scan(&mb); err != nil {
|
||||
err = gerror.Wrap(err, "获取用户信息失败,请稍后重试!")
|
||||
return
|
||||
}
|
||||
|
||||
if mb == nil {
|
||||
err = gerror.Wrap(err, "账号不存在或已被删除!")
|
||||
return
|
||||
}
|
||||
|
||||
if mb.Status != consts.StatusEnabled {
|
||||
err = gerror.New("账号已被禁用,如有疑问请联系管理员")
|
||||
return
|
||||
}
|
||||
|
||||
var role *entity.AdminRole
|
||||
if err = g.Model("admin_role").Ctx(ctx).Fields("id,key,status").Where("id", mb.RoleId).Scan(&role); err != nil || role == nil {
|
||||
err = gerror.Wrap(err, "获取角色信息失败,请稍后重试!")
|
||||
return
|
||||
}
|
||||
|
||||
if role.Status != consts.StatusEnabled {
|
||||
err = gerror.New("角色已被禁用,如有疑问请联系管理员")
|
||||
return
|
||||
}
|
||||
|
||||
user := &model.Identity{
|
||||
Id: mb.Id,
|
||||
Pid: mb.Pid,
|
||||
DeptId: mb.DeptId,
|
||||
RoleId: mb.RoleId,
|
||||
RoleKey: role.Key,
|
||||
Username: mb.Username,
|
||||
RealName: mb.RealName,
|
||||
Avatar: mb.Avatar,
|
||||
Email: mb.Email,
|
||||
Mobile: mb.Mobile,
|
||||
App: claims.App,
|
||||
LoginAt: claims.LoginAt,
|
||||
}
|
||||
|
||||
contexts.SetUser(ctx, user)
|
||||
return
|
||||
}
|
||||
|
@ -155,7 +155,15 @@ func (s *sMiddleware) DeliverUserContext(r *ghttp.Request) (err error) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
contexts.SetUser(r.Context(), user)
|
||||
|
||||
switch user.App {
|
||||
case consts.AppAdmin:
|
||||
if err = service.AdminSite().BindUserContext(r.Context(), user); err != nil {
|
||||
return
|
||||
}
|
||||
default:
|
||||
contexts.SetUser(r.Context(), user)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -19,49 +19,47 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
IAdminRole interface {
|
||||
// Verify 验证权限
|
||||
Verify(ctx context.Context, path, method string) bool
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *adminin.RoleListInp) (res *adminin.RoleListModel, totalCount int, err error)
|
||||
// GetName 获取指定角色的名称
|
||||
GetName(ctx context.Context, id int64) (name string, err error)
|
||||
// GetMemberList 获取指定用户的岗位列表
|
||||
GetMemberList(ctx context.Context, id int64) (list []*adminin.RoleListModel, err error)
|
||||
// GetPermissions 更改角色菜单权限
|
||||
GetPermissions(ctx context.Context, in *adminin.GetPermissionsInp) (res *adminin.GetPermissionsModel, err error)
|
||||
// UpdatePermissions 更改角色菜单权限
|
||||
UpdatePermissions(ctx context.Context, in *adminin.UpdatePermissionsInp) (err error)
|
||||
Edit(ctx context.Context, in *adminin.RoleEditInp) (err error)
|
||||
Delete(ctx context.Context, in *adminin.RoleDeleteInp) (err error)
|
||||
DataScopeSelect() (res form.Selects)
|
||||
DataScopeEdit(ctx context.Context, in *adminin.DataScopeEditInp) (err error)
|
||||
// VerifyRoleId 验证角色ID
|
||||
VerifyRoleId(ctx context.Context, id int64) (err error)
|
||||
// GetSubRoleIds 获取所有下级角色ID
|
||||
GetSubRoleIds(ctx context.Context, roleId int64, isSuper bool) (ids []int64, err error)
|
||||
}
|
||||
IAdminCash interface {
|
||||
// View 获取指定提现信息
|
||||
View(ctx context.Context, in *adminin.CashViewInp) (res *adminin.CashViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *adminin.CashListInp) (list []*adminin.CashListModel, totalCount int, err error)
|
||||
// Apply 申请提现
|
||||
Apply(ctx context.Context, in *adminin.CashApplyInp) (err error)
|
||||
// Payment 提现打款处理
|
||||
Payment(ctx context.Context, in *adminin.CashPaymentInp) (err error)
|
||||
}
|
||||
IAdminCreditsLog interface {
|
||||
// Model 资产变动ORM模型
|
||||
IAdminOrder interface {
|
||||
// Model 充值订单ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// SaveBalance 更新余额
|
||||
SaveBalance(ctx context.Context, in *adminin.CreditsLogSaveBalanceInp) (res *adminin.CreditsLogSaveBalanceModel, err error)
|
||||
// SaveIntegral 更新积分
|
||||
SaveIntegral(ctx context.Context, in *adminin.CreditsLogSaveIntegralInp) (res *adminin.CreditsLogSaveIntegralModel, err error)
|
||||
// List 获取资产变动列表
|
||||
List(ctx context.Context, in *adminin.CreditsLogListInp) (list []*adminin.CreditsLogListModel, totalCount int, err error)
|
||||
// Export 导出资产变动
|
||||
Export(ctx context.Context, in *adminin.CreditsLogListInp) (err error)
|
||||
// AcceptRefund 受理申请退款
|
||||
AcceptRefund(ctx context.Context, in *adminin.OrderAcceptRefundInp) (err error)
|
||||
// ApplyRefund 申请退款
|
||||
ApplyRefund(ctx context.Context, in *adminin.OrderApplyRefundInp) (err error)
|
||||
// PayNotify 支付成功通知
|
||||
PayNotify(ctx context.Context, in *payin.NotifyCallFuncInp) (err error)
|
||||
// Create 创建充值订单
|
||||
Create(ctx context.Context, in *adminin.OrderCreateInp) (res *adminin.OrderCreateModel, err error)
|
||||
// List 获取充值订单列表
|
||||
List(ctx context.Context, in *adminin.OrderListInp) (list []*adminin.OrderListModel, totalCount int, err error)
|
||||
// Export 导出充值订单
|
||||
Export(ctx context.Context, in *adminin.OrderListInp) (err error)
|
||||
// Edit 修改/新增充值订单
|
||||
Edit(ctx context.Context, in *adminin.OrderEditInp) (err error)
|
||||
// Delete 删除充值订单
|
||||
Delete(ctx context.Context, in *adminin.OrderDeleteInp) (err error)
|
||||
// View 获取充值订单指定信息
|
||||
View(ctx context.Context, in *adminin.OrderViewInp) (res *adminin.OrderViewModel, err error)
|
||||
// Status 更新充值订单状态
|
||||
Status(ctx context.Context, in *adminin.OrderStatusInp) (err error)
|
||||
}
|
||||
IAdminPost interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *adminin.PostDeleteInp) (err error)
|
||||
// VerifyUnique 验证部门唯一属性
|
||||
VerifyUnique(ctx context.Context, in *adminin.VerifyUniqueInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *adminin.PostEditInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *adminin.PostMaxSortInp) (res *adminin.PostMaxSortModel, err error)
|
||||
// View 获取指定岗位信息
|
||||
View(ctx context.Context, in *adminin.PostViewInp) (res *adminin.PostViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *adminin.PostListInp) (list []*adminin.PostListModel, totalCount int, err error)
|
||||
// GetMemberByStartName 获取指定用户的第一岗位
|
||||
GetMemberByStartName(ctx context.Context, memberId int64) (name string, err error)
|
||||
// Status 更新状态
|
||||
Status(ctx context.Context, in *adminin.PostStatusInp) (err error)
|
||||
}
|
||||
IAdminDept interface {
|
||||
// Delete 删除
|
||||
@ -85,6 +83,110 @@ type (
|
||||
// VerifyDeptId 验证部门ID
|
||||
VerifyDeptId(ctx context.Context, id int64) (err error)
|
||||
}
|
||||
IAdminMenu interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *adminin.MenuDeleteInp) (err error)
|
||||
// VerifyUnique 验证菜单唯一属性
|
||||
VerifyUnique(ctx context.Context, in *adminin.VerifyUniqueInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *adminin.MenuEditInp) (err error)
|
||||
// List 获取菜单列表
|
||||
List(ctx context.Context, in *adminin.MenuListInp) (res *adminin.MenuListModel, err error)
|
||||
// GetMenuList 获取菜单列表
|
||||
GetMenuList(ctx context.Context, memberId int64) (res *role.DynamicRes, err error)
|
||||
// LoginPermissions 获取登录成功后的细粒度权限
|
||||
LoginPermissions(ctx context.Context, memberId int64) (lists adminin.MemberLoginPermissions, err error)
|
||||
}
|
||||
IAdminMonitor interface {
|
||||
// StartMonitor 启动服务监控
|
||||
StartMonitor(ctx context.Context)
|
||||
// GetMeta 获取监控元数据
|
||||
GetMeta(ctx context.Context) *model.MonitorData
|
||||
}
|
||||
IAdminMemberPost interface {
|
||||
// UpdatePostIds 更新用户岗位
|
||||
UpdatePostIds(ctx context.Context, memberId int64, postIds []int64) (err error)
|
||||
}
|
||||
IAdminNotice interface {
|
||||
// Model Orm模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *adminin.NoticeDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *adminin.NoticeEditInp) (err error)
|
||||
// Status 更新部门状态
|
||||
Status(ctx context.Context, in *adminin.NoticeStatusInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *adminin.NoticeMaxSortInp) (res *adminin.NoticeMaxSortModel, err error)
|
||||
// View 获取指定字典类型信息
|
||||
View(ctx context.Context, in *adminin.NoticeViewInp) (res *adminin.NoticeViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *adminin.NoticeListInp) (list []*adminin.NoticeListModel, totalCount int, err error)
|
||||
// PullMessages 拉取未读消息列表
|
||||
PullMessages(ctx context.Context, in *adminin.PullMessagesInp) (res *adminin.PullMessagesModel, err error)
|
||||
// UnreadCount 获取所有类型消息的未读数量
|
||||
UnreadCount(ctx context.Context, in *adminin.NoticeUnreadCountInp) (res *adminin.NoticeUnreadCountModel, err error)
|
||||
// UpRead 更新已读
|
||||
UpRead(ctx context.Context, in *adminin.NoticeUpReadInp) (err error)
|
||||
// ReadAll 已读全部
|
||||
ReadAll(ctx context.Context, in *adminin.NoticeReadAllInp) (err error)
|
||||
// MessageList 我的消息列表
|
||||
MessageList(ctx context.Context, in *adminin.NoticeMessageListInp) (list []*adminin.NoticeMessageListModel, totalCount int, err error)
|
||||
}
|
||||
IAdminRole interface {
|
||||
// Verify 验证权限
|
||||
Verify(ctx context.Context, path, method string) bool
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *adminin.RoleListInp) (res *adminin.RoleListModel, totalCount int, err error)
|
||||
// GetName 获取指定角色的名称
|
||||
GetName(ctx context.Context, id int64) (name string, err error)
|
||||
// GetMemberList 获取指定用户的岗位列表
|
||||
GetMemberList(ctx context.Context, id int64) (list []*adminin.RoleListModel, err error)
|
||||
// GetPermissions 更改角色菜单权限
|
||||
GetPermissions(ctx context.Context, in *adminin.GetPermissionsInp) (res *adminin.GetPermissionsModel, err error)
|
||||
// UpdatePermissions 更改角色菜单权限
|
||||
UpdatePermissions(ctx context.Context, in *adminin.UpdatePermissionsInp) (err error)
|
||||
Edit(ctx context.Context, in *adminin.RoleEditInp) (err error)
|
||||
Delete(ctx context.Context, in *adminin.RoleDeleteInp) (err error)
|
||||
DataScopeSelect() (res form.Selects)
|
||||
DataScopeEdit(ctx context.Context, in *adminin.DataScopeEditInp) (err error)
|
||||
// VerifyRoleId 验证角色ID
|
||||
VerifyRoleId(ctx context.Context, id int64) (err error)
|
||||
// GetSubRoleIds 获取所有下级角色ID
|
||||
GetSubRoleIds(ctx context.Context, roleId int64, isSuper bool) (ids []int64, err error)
|
||||
}
|
||||
IAdminSite interface {
|
||||
// Register 账号注册
|
||||
Register(ctx context.Context, in *adminin.RegisterInp) (err error)
|
||||
// AccountLogin 账号登录
|
||||
AccountLogin(ctx context.Context, in *adminin.AccountLoginInp) (res *adminin.LoginModel, err error)
|
||||
// MobileLogin 手机号登录
|
||||
MobileLogin(ctx context.Context, in *adminin.MobileLoginInp) (res *adminin.LoginModel, err error)
|
||||
// BindUserContext 绑定用户上下文
|
||||
BindUserContext(ctx context.Context, claims *model.Identity) (err error)
|
||||
}
|
||||
IAdminCash interface {
|
||||
// View 获取指定提现信息
|
||||
View(ctx context.Context, in *adminin.CashViewInp) (res *adminin.CashViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *adminin.CashListInp) (list []*adminin.CashListModel, totalCount int, err error)
|
||||
// Apply 申请提现
|
||||
Apply(ctx context.Context, in *adminin.CashApplyInp) (err error)
|
||||
// Payment 提现打款处理
|
||||
Payment(ctx context.Context, in *adminin.CashPaymentInp) (err error)
|
||||
}
|
||||
IAdminCreditsLog interface {
|
||||
// Model 资产变动ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// SaveBalance 更新余额
|
||||
SaveBalance(ctx context.Context, in *adminin.CreditsLogSaveBalanceInp) (res *adminin.CreditsLogSaveBalanceModel, err error)
|
||||
// SaveIntegral 更新积分
|
||||
SaveIntegral(ctx context.Context, in *adminin.CreditsLogSaveIntegralInp) (res *adminin.CreditsLogSaveIntegralModel, err error)
|
||||
// List 获取资产变动列表
|
||||
List(ctx context.Context, in *adminin.CreditsLogListInp) (list []*adminin.CreditsLogListModel, totalCount int, err error)
|
||||
// Export 导出资产变动
|
||||
Export(ctx context.Context, in *adminin.CreditsLogListInp) (err error)
|
||||
}
|
||||
IAdminMember interface {
|
||||
// AddBalance 增加余额
|
||||
AddBalance(ctx context.Context, in *adminin.MemberAddBalanceInp) (err error)
|
||||
@ -130,157 +232,58 @@ type (
|
||||
LoadSuperAdmin(ctx context.Context)
|
||||
// ClusterSyncSuperAdmin 集群同步
|
||||
ClusterSyncSuperAdmin(ctx context.Context, message *gredis.Message)
|
||||
// FilterAuthModel 过滤查询权限,如果不是超管则排除掉自己
|
||||
// FilterAuthModel 过滤用户操作权限
|
||||
// 非超管用户只能操作自己的下级角色用户,并且需要满足自身角色的数据权限设置
|
||||
FilterAuthModel(ctx context.Context, memberId int64) *gdb.Model
|
||||
}
|
||||
IAdminMemberPost interface {
|
||||
// UpdatePostIds 更新用户岗位
|
||||
UpdatePostIds(ctx context.Context, memberId int64, postIds []int64) (err error)
|
||||
}
|
||||
IAdminPost interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *adminin.PostDeleteInp) (err error)
|
||||
// VerifyUnique 验证部门唯一属性
|
||||
VerifyUnique(ctx context.Context, in *adminin.VerifyUniqueInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *adminin.PostEditInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *adminin.PostMaxSortInp) (res *adminin.PostMaxSortModel, err error)
|
||||
// View 获取指定岗位信息
|
||||
View(ctx context.Context, in *adminin.PostViewInp) (res *adminin.PostViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *adminin.PostListInp) (list []*adminin.PostListModel, totalCount int, err error)
|
||||
// GetMemberByStartName 获取指定用户的第一岗位
|
||||
GetMemberByStartName(ctx context.Context, memberId int64) (name string, err error)
|
||||
// Status 更新状态
|
||||
Status(ctx context.Context, in *adminin.PostStatusInp) (err error)
|
||||
}
|
||||
IAdminMenu interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *adminin.MenuDeleteInp) (err error)
|
||||
// VerifyUnique 验证菜单唯一属性
|
||||
VerifyUnique(ctx context.Context, in *adminin.VerifyUniqueInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *adminin.MenuEditInp) (err error)
|
||||
// List 获取菜单列表
|
||||
List(ctx context.Context, in *adminin.MenuListInp) (res *adminin.MenuListModel, err error)
|
||||
// GetMenuList 获取菜单列表
|
||||
GetMenuList(ctx context.Context, memberId int64) (res *role.DynamicRes, err error)
|
||||
// LoginPermissions 获取登录成功后的细粒度权限
|
||||
LoginPermissions(ctx context.Context, memberId int64) (lists adminin.MemberLoginPermissions, err error)
|
||||
}
|
||||
IAdminMonitor interface {
|
||||
// StartMonitor 启动服务监控
|
||||
StartMonitor(ctx context.Context)
|
||||
// GetMeta 获取监控元数据
|
||||
GetMeta(ctx context.Context) *model.MonitorData
|
||||
}
|
||||
IAdminNotice interface {
|
||||
// Model Orm模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *adminin.NoticeDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *adminin.NoticeEditInp) (err error)
|
||||
// Status 更新部门状态
|
||||
Status(ctx context.Context, in *adminin.NoticeStatusInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *adminin.NoticeMaxSortInp) (res *adminin.NoticeMaxSortModel, err error)
|
||||
// View 获取指定字典类型信息
|
||||
View(ctx context.Context, in *adminin.NoticeViewInp) (res *adminin.NoticeViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *adminin.NoticeListInp) (list []*adminin.NoticeListModel, totalCount int, err error)
|
||||
// PullMessages 拉取未读消息列表
|
||||
PullMessages(ctx context.Context, in *adminin.PullMessagesInp) (res *adminin.PullMessagesModel, err error)
|
||||
// UnreadCount 获取所有类型消息的未读数量
|
||||
UnreadCount(ctx context.Context, in *adminin.NoticeUnreadCountInp) (res *adminin.NoticeUnreadCountModel, err error)
|
||||
// UpRead 更新已读
|
||||
UpRead(ctx context.Context, in *adminin.NoticeUpReadInp) (err error)
|
||||
// ReadAll 已读全部
|
||||
ReadAll(ctx context.Context, in *adminin.NoticeReadAllInp) (err error)
|
||||
// MessageList 我的消息列表
|
||||
MessageList(ctx context.Context, in *adminin.NoticeMessageListInp) (list []*adminin.NoticeMessageListModel, totalCount int, err error)
|
||||
}
|
||||
IAdminOrder interface {
|
||||
// Model 充值订单ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// AcceptRefund 受理申请退款
|
||||
AcceptRefund(ctx context.Context, in *adminin.OrderAcceptRefundInp) (err error)
|
||||
// ApplyRefund 申请退款
|
||||
ApplyRefund(ctx context.Context, in *adminin.OrderApplyRefundInp) (err error)
|
||||
// PayNotify 支付成功通知
|
||||
PayNotify(ctx context.Context, in *payin.NotifyCallFuncInp) (err error)
|
||||
// Create 创建充值订单
|
||||
Create(ctx context.Context, in *adminin.OrderCreateInp) (res *adminin.OrderCreateModel, err error)
|
||||
// List 获取充值订单列表
|
||||
List(ctx context.Context, in *adminin.OrderListInp) (list []*adminin.OrderListModel, totalCount int, err error)
|
||||
// Export 导出充值订单
|
||||
Export(ctx context.Context, in *adminin.OrderListInp) (err error)
|
||||
// Edit 修改/新增充值订单
|
||||
Edit(ctx context.Context, in *adminin.OrderEditInp) (err error)
|
||||
// Delete 删除充值订单
|
||||
Delete(ctx context.Context, in *adminin.OrderDeleteInp) (err error)
|
||||
// View 获取充值订单指定信息
|
||||
View(ctx context.Context, in *adminin.OrderViewInp) (res *adminin.OrderViewModel, err error)
|
||||
// Status 更新充值订单状态
|
||||
Status(ctx context.Context, in *adminin.OrderStatusInp) (err error)
|
||||
}
|
||||
IAdminSite interface {
|
||||
// Register 账号注册
|
||||
Register(ctx context.Context, in *adminin.RegisterInp) (err error)
|
||||
// AccountLogin 账号登录
|
||||
AccountLogin(ctx context.Context, in *adminin.AccountLoginInp) (res *adminin.LoginModel, err error)
|
||||
// MobileLogin 手机号登录
|
||||
MobileLogin(ctx context.Context, in *adminin.MobileLoginInp) (res *adminin.LoginModel, err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localAdminCreditsLog IAdminCreditsLog
|
||||
localAdminDept IAdminDept
|
||||
localAdminMember IAdminMember
|
||||
localAdminMemberPost IAdminMemberPost
|
||||
localAdminPost IAdminPost
|
||||
localAdminRole IAdminRole
|
||||
localAdminCash IAdminCash
|
||||
localAdminMonitor IAdminMonitor
|
||||
localAdminNotice IAdminNotice
|
||||
localAdminOrder IAdminOrder
|
||||
localAdminRole IAdminRole
|
||||
localAdminSite IAdminSite
|
||||
localAdminCash IAdminCash
|
||||
localAdminCreditsLog IAdminCreditsLog
|
||||
localAdminMember IAdminMember
|
||||
localAdminOrder IAdminOrder
|
||||
localAdminPost IAdminPost
|
||||
localAdminDept IAdminDept
|
||||
localAdminMenu IAdminMenu
|
||||
localAdminMonitor IAdminMonitor
|
||||
)
|
||||
|
||||
func AdminRole() IAdminRole {
|
||||
if localAdminRole == nil {
|
||||
panic("implement not found for interface IAdminRole, forgot register?")
|
||||
func AdminMonitor() IAdminMonitor {
|
||||
if localAdminMonitor == nil {
|
||||
panic("implement not found for interface IAdminMonitor, forgot register?")
|
||||
}
|
||||
return localAdminRole
|
||||
return localAdminMonitor
|
||||
}
|
||||
|
||||
func RegisterAdminRole(i IAdminRole) {
|
||||
localAdminRole = i
|
||||
func RegisterAdminMonitor(i IAdminMonitor) {
|
||||
localAdminMonitor = i
|
||||
}
|
||||
|
||||
func AdminCash() IAdminCash {
|
||||
if localAdminCash == nil {
|
||||
panic("implement not found for interface IAdminCash, forgot register?")
|
||||
func AdminOrder() IAdminOrder {
|
||||
if localAdminOrder == nil {
|
||||
panic("implement not found for interface IAdminOrder, forgot register?")
|
||||
}
|
||||
return localAdminCash
|
||||
return localAdminOrder
|
||||
}
|
||||
|
||||
func RegisterAdminCash(i IAdminCash) {
|
||||
localAdminCash = i
|
||||
func RegisterAdminOrder(i IAdminOrder) {
|
||||
localAdminOrder = i
|
||||
}
|
||||
|
||||
func AdminCreditsLog() IAdminCreditsLog {
|
||||
if localAdminCreditsLog == nil {
|
||||
panic("implement not found for interface IAdminCreditsLog, forgot register?")
|
||||
func AdminPost() IAdminPost {
|
||||
if localAdminPost == nil {
|
||||
panic("implement not found for interface IAdminPost, forgot register?")
|
||||
}
|
||||
return localAdminCreditsLog
|
||||
return localAdminPost
|
||||
}
|
||||
|
||||
func RegisterAdminCreditsLog(i IAdminCreditsLog) {
|
||||
localAdminCreditsLog = i
|
||||
func RegisterAdminPost(i IAdminPost) {
|
||||
localAdminPost = i
|
||||
}
|
||||
|
||||
func AdminDept() IAdminDept {
|
||||
@ -294,6 +297,17 @@ func RegisterAdminDept(i IAdminDept) {
|
||||
localAdminDept = i
|
||||
}
|
||||
|
||||
func AdminMenu() IAdminMenu {
|
||||
if localAdminMenu == nil {
|
||||
panic("implement not found for interface IAdminMenu, forgot register?")
|
||||
}
|
||||
return localAdminMenu
|
||||
}
|
||||
|
||||
func RegisterAdminMenu(i IAdminMenu) {
|
||||
localAdminMenu = i
|
||||
}
|
||||
|
||||
func AdminMember() IAdminMember {
|
||||
if localAdminMember == nil {
|
||||
panic("implement not found for interface IAdminMember, forgot register?")
|
||||
@ -316,39 +330,6 @@ func RegisterAdminMemberPost(i IAdminMemberPost) {
|
||||
localAdminMemberPost = i
|
||||
}
|
||||
|
||||
func AdminPost() IAdminPost {
|
||||
if localAdminPost == nil {
|
||||
panic("implement not found for interface IAdminPost, forgot register?")
|
||||
}
|
||||
return localAdminPost
|
||||
}
|
||||
|
||||
func RegisterAdminPost(i IAdminPost) {
|
||||
localAdminPost = i
|
||||
}
|
||||
|
||||
func AdminMenu() IAdminMenu {
|
||||
if localAdminMenu == nil {
|
||||
panic("implement not found for interface IAdminMenu, forgot register?")
|
||||
}
|
||||
return localAdminMenu
|
||||
}
|
||||
|
||||
func RegisterAdminMenu(i IAdminMenu) {
|
||||
localAdminMenu = i
|
||||
}
|
||||
|
||||
func AdminMonitor() IAdminMonitor {
|
||||
if localAdminMonitor == nil {
|
||||
panic("implement not found for interface IAdminMonitor, forgot register?")
|
||||
}
|
||||
return localAdminMonitor
|
||||
}
|
||||
|
||||
func RegisterAdminMonitor(i IAdminMonitor) {
|
||||
localAdminMonitor = i
|
||||
}
|
||||
|
||||
func AdminNotice() IAdminNotice {
|
||||
if localAdminNotice == nil {
|
||||
panic("implement not found for interface IAdminNotice, forgot register?")
|
||||
@ -360,15 +341,15 @@ func RegisterAdminNotice(i IAdminNotice) {
|
||||
localAdminNotice = i
|
||||
}
|
||||
|
||||
func AdminOrder() IAdminOrder {
|
||||
if localAdminOrder == nil {
|
||||
panic("implement not found for interface IAdminOrder, forgot register?")
|
||||
func AdminRole() IAdminRole {
|
||||
if localAdminRole == nil {
|
||||
panic("implement not found for interface IAdminRole, forgot register?")
|
||||
}
|
||||
return localAdminOrder
|
||||
return localAdminRole
|
||||
}
|
||||
|
||||
func RegisterAdminOrder(i IAdminOrder) {
|
||||
localAdminOrder = i
|
||||
func RegisterAdminRole(i IAdminRole) {
|
||||
localAdminRole = i
|
||||
}
|
||||
|
||||
func AdminSite() IAdminSite {
|
||||
@ -381,3 +362,25 @@ func AdminSite() IAdminSite {
|
||||
func RegisterAdminSite(i IAdminSite) {
|
||||
localAdminSite = i
|
||||
}
|
||||
|
||||
func AdminCash() IAdminCash {
|
||||
if localAdminCash == nil {
|
||||
panic("implement not found for interface IAdminCash, forgot register?")
|
||||
}
|
||||
return localAdminCash
|
||||
}
|
||||
|
||||
func RegisterAdminCash(i IAdminCash) {
|
||||
localAdminCash = i
|
||||
}
|
||||
|
||||
func AdminCreditsLog() IAdminCreditsLog {
|
||||
if localAdminCreditsLog == nil {
|
||||
panic("implement not found for interface IAdminCreditsLog, forgot register?")
|
||||
}
|
||||
return localAdminCreditsLog
|
||||
}
|
||||
|
||||
func RegisterAdminCreditsLog(i IAdminCreditsLog) {
|
||||
localAdminCreditsLog = i
|
||||
}
|
||||
|
@ -18,43 +18,97 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
ISysServeLicense interface {
|
||||
// Model 服务许可证ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// List 获取服务许可证列表
|
||||
List(ctx context.Context, in *sysin.ServeLicenseListInp) (list []*sysin.ServeLicenseListModel, totalCount int, err error)
|
||||
// Export 导出服务许可证
|
||||
Export(ctx context.Context, in *sysin.ServeLicenseListInp) (err error)
|
||||
// Edit 修改/新增服务许可证
|
||||
Edit(ctx context.Context, in *sysin.ServeLicenseEditInp) (err error)
|
||||
// Delete 删除服务许可证
|
||||
Delete(ctx context.Context, in *sysin.ServeLicenseDeleteInp) (err error)
|
||||
// View 获取服务许可证指定信息
|
||||
View(ctx context.Context, in *sysin.ServeLicenseViewInp) (res *sysin.ServeLicenseViewModel, err error)
|
||||
// Status 更新服务许可证状态
|
||||
Status(ctx context.Context, in *sysin.ServeLicenseStatusInp) (err error)
|
||||
// AssignRouter 分配服务许可证路由
|
||||
AssignRouter(ctx context.Context, in *sysin.ServeLicenseAssignRouterInp) (err error)
|
||||
}
|
||||
ISysSmsLog interface {
|
||||
ISysCronGroup interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.SmsLogDeleteInp) (err error)
|
||||
Delete(ctx context.Context, in *sysin.CronGroupDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.SmsLogEditInp) (err error)
|
||||
// Status 更新短信状态
|
||||
Status(ctx context.Context, in *sysin.SmsLogStatusInp) (err error)
|
||||
// View 获取指定字典类型信息
|
||||
View(ctx context.Context, in *sysin.SmsLogViewInp) (res *sysin.SmsLogViewModel, err error)
|
||||
Edit(ctx context.Context, in *sysin.CronGroupEditInp) (err error)
|
||||
// Status 更新状态
|
||||
Status(ctx context.Context, in *sysin.CronGroupStatusInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.CronGroupMaxSortInp) (res *sysin.CronGroupMaxSortModel, err error)
|
||||
// View 获取指定信息
|
||||
View(ctx context.Context, in *sysin.CronGroupViewInp) (res *sysin.CronGroupViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.SmsLogListInp) (list []*sysin.SmsLogListModel, totalCount int, err error)
|
||||
// SendCode 发送验证码
|
||||
SendCode(ctx context.Context, in *sysin.SendCodeInp) (err error)
|
||||
// GetTemplate 获取指定短信模板
|
||||
GetTemplate(ctx context.Context, template string, config *model.SmsConfig) (val string, err error)
|
||||
// AllowSend 是否允许发送
|
||||
AllowSend(ctx context.Context, models *entity.SysSmsLog, config *model.SmsConfig) (err error)
|
||||
// VerifyCode 效验验证码
|
||||
VerifyCode(ctx context.Context, in *sysin.VerifyCodeInp) (err error)
|
||||
List(ctx context.Context, in *sysin.CronGroupListInp) (list []*sysin.CronGroupListModel, totalCount int, err error)
|
||||
// Select 选项
|
||||
Select(ctx context.Context, in *sysin.CronGroupSelectInp) (res *sysin.CronGroupSelectModel, err error)
|
||||
}
|
||||
ISysDictType interface {
|
||||
// Tree 树
|
||||
Tree(ctx context.Context) (list []*sysin.DictTypeTree, err error)
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.DictTypeDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.DictTypeEditInp) (err error)
|
||||
// TreeSelect 获取类型关系树选项
|
||||
TreeSelect(ctx context.Context, in *sysin.DictTreeSelectInp) (list []*sysin.DictTypeTree, err error)
|
||||
}
|
||||
ISysLog interface {
|
||||
// Export 导出
|
||||
Export(ctx context.Context, in *sysin.LogListInp) (err error)
|
||||
// RealWrite 真实写入
|
||||
RealWrite(ctx context.Context, log entity.SysLog) (err error)
|
||||
// AutoLog 根据配置自动记录请求日志
|
||||
AutoLog(ctx context.Context) error
|
||||
// AnalysisLog 解析日志数据
|
||||
AnalysisLog(ctx context.Context) entity.SysLog
|
||||
// View 获取指定字典类型信息
|
||||
View(ctx context.Context, in *sysin.LogViewInp) (res *sysin.LogViewModel, err error)
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.LogDeleteInp) (err error)
|
||||
// List 列表
|
||||
List(ctx context.Context, in *sysin.LogListInp) (list []*sysin.LogListModel, totalCount int, err error)
|
||||
}
|
||||
ISysLoginLog interface {
|
||||
// Model 登录日志Orm模型
|
||||
Model(ctx context.Context) *gdb.Model
|
||||
// List 获取登录日志列表
|
||||
List(ctx context.Context, in *sysin.LoginLogListInp) (list []*sysin.LoginLogListModel, totalCount int, err error)
|
||||
// Export 导出登录日志
|
||||
Export(ctx context.Context, in *sysin.LoginLogListInp) (err error)
|
||||
// Delete 删除登录日志
|
||||
Delete(ctx context.Context, in *sysin.LoginLogDeleteInp) (err error)
|
||||
// View 获取登录日志指定信息
|
||||
View(ctx context.Context, in *sysin.LoginLogViewInp) (res *sysin.LoginLogViewModel, err error)
|
||||
// Push 推送登录日志
|
||||
Push(ctx context.Context, in *sysin.LoginLogPushInp)
|
||||
// RealWrite 真实写入
|
||||
RealWrite(ctx context.Context, models entity.SysLoginLog) (err error)
|
||||
}
|
||||
ISysProvinces interface {
|
||||
// Tree 关系树选项列表
|
||||
Tree(ctx context.Context) (list []*sysin.ProvincesTree, err error)
|
||||
// Delete 删除省市区数据
|
||||
Delete(ctx context.Context, in *sysin.ProvincesDeleteInp) (err error)
|
||||
// Edit 修改/新增省市区数据
|
||||
Edit(ctx context.Context, in *sysin.ProvincesEditInp) (err error)
|
||||
// Status 更新省市区状态
|
||||
Status(ctx context.Context, in *sysin.ProvincesStatusInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.ProvincesMaxSortInp) (res *sysin.ProvincesMaxSortModel, err error)
|
||||
// View 获取省市区信息
|
||||
View(ctx context.Context, in *sysin.ProvincesViewInp) (res *sysin.ProvincesViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.ProvincesListInp) (list []*sysin.ProvincesListModel, totalCount int, err error)
|
||||
// ChildrenList 获取省市区下级列表
|
||||
ChildrenList(ctx context.Context, in *sysin.ProvincesChildrenListInp) (list []*sysin.ProvincesChildrenListModel, totalCount int, err error)
|
||||
// UniqueId 获取省市区下级列表
|
||||
UniqueId(ctx context.Context, in *sysin.ProvincesUniqueIdInp) (res *sysin.ProvincesUniqueIdModel, err error)
|
||||
// Select 省市区选项
|
||||
Select(ctx context.Context, in *sysin.ProvincesSelectInp) (res *sysin.ProvincesSelectModel, err error)
|
||||
}
|
||||
ISysAttachment interface {
|
||||
// Model ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// Delete 删除附件
|
||||
Delete(ctx context.Context, in *sysin.AttachmentDeleteInp) (err error)
|
||||
// View 获取附件信息
|
||||
View(ctx context.Context, in *sysin.AttachmentViewInp) (res *sysin.AttachmentViewModel, err error)
|
||||
// List 获取附件列表
|
||||
List(ctx context.Context, in *sysin.AttachmentListInp) (list []*sysin.AttachmentListModel, totalCount int, err error)
|
||||
// ClearKind 清空上传类型
|
||||
ClearKind(ctx context.Context, in *sysin.AttachmentClearKindInp) (err error)
|
||||
}
|
||||
ISysConfig interface {
|
||||
// InitConfig 初始化系统配置
|
||||
@ -98,87 +152,58 @@ type (
|
||||
// ClusterSync 集群同步
|
||||
ClusterSync(ctx context.Context, message *gredis.Message)
|
||||
}
|
||||
ISysEmsLog interface {
|
||||
ISysCron interface {
|
||||
StartCron(ctx context.Context)
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.EmsLogDeleteInp) (err error)
|
||||
Delete(ctx context.Context, in *sysin.CronDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.EmsLogEditInp) (err error)
|
||||
// Status 更新部门状态
|
||||
Status(ctx context.Context, in *sysin.EmsLogStatusInp) (err error)
|
||||
// View 获取指定字典类型信息
|
||||
View(ctx context.Context, in *sysin.EmsLogViewInp) (res *sysin.EmsLogViewModel, err error)
|
||||
Edit(ctx context.Context, in *sysin.CronEditInp) (err error)
|
||||
// Status 更新状态
|
||||
Status(ctx context.Context, in *sysin.CronStatusInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.CronMaxSortInp) (res *sysin.CronMaxSortModel, err error)
|
||||
// View 获取指定信息
|
||||
View(ctx context.Context, in *sysin.CronViewInp) (res *sysin.CronViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.EmsLogListInp) (list []*sysin.EmsLogListModel, totalCount int, err error)
|
||||
// Send 发送邮件
|
||||
Send(ctx context.Context, in *sysin.SendEmsInp) (err error)
|
||||
// GetTemplate 获取指定邮件模板
|
||||
GetTemplate(ctx context.Context, template string, config *model.EmailConfig) (val string, err error)
|
||||
// AllowSend 是否允许发送
|
||||
AllowSend(ctx context.Context, models *entity.SysEmsLog, config *model.EmailConfig) (err error)
|
||||
// VerifyCode 效验验证码
|
||||
VerifyCode(ctx context.Context, in *sysin.VerifyEmsCodeInp) (err error)
|
||||
List(ctx context.Context, in *sysin.CronListInp) (list []*sysin.CronListModel, totalCount int, err error)
|
||||
// GetName 获取分组名称
|
||||
GetName(ctx context.Context, id int64) (name string, err error)
|
||||
// OnlineExec 在线执行
|
||||
OnlineExec(ctx context.Context, in *sysin.OnlineExecInp) (err error)
|
||||
}
|
||||
ISysLoginLog interface {
|
||||
// Model 登录日志Orm模型
|
||||
Model(ctx context.Context) *gdb.Model
|
||||
// List 获取登录日志列表
|
||||
List(ctx context.Context, in *sysin.LoginLogListInp) (list []*sysin.LoginLogListModel, totalCount int, err error)
|
||||
// Export 导出登录日志
|
||||
Export(ctx context.Context, in *sysin.LoginLogListInp) (err error)
|
||||
// Delete 删除登录日志
|
||||
Delete(ctx context.Context, in *sysin.LoginLogDeleteInp) (err error)
|
||||
// View 获取登录日志指定信息
|
||||
View(ctx context.Context, in *sysin.LoginLogViewInp) (res *sysin.LoginLogViewModel, err error)
|
||||
// Push 推送登录日志
|
||||
Push(ctx context.Context, in *sysin.LoginLogPushInp)
|
||||
// RealWrite 真实写入
|
||||
RealWrite(ctx context.Context, models entity.SysLoginLog) (err error)
|
||||
ISysServeLicense interface {
|
||||
// Model 服务许可证ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// List 获取服务许可证列表
|
||||
List(ctx context.Context, in *sysin.ServeLicenseListInp) (list []*sysin.ServeLicenseListModel, totalCount int, err error)
|
||||
// Export 导出服务许可证
|
||||
Export(ctx context.Context, in *sysin.ServeLicenseListInp) (err error)
|
||||
// Edit 修改/新增服务许可证
|
||||
Edit(ctx context.Context, in *sysin.ServeLicenseEditInp) (err error)
|
||||
// Delete 删除服务许可证
|
||||
Delete(ctx context.Context, in *sysin.ServeLicenseDeleteInp) (err error)
|
||||
// View 获取服务许可证指定信息
|
||||
View(ctx context.Context, in *sysin.ServeLicenseViewInp) (res *sysin.ServeLicenseViewModel, err error)
|
||||
// Status 更新服务许可证状态
|
||||
Status(ctx context.Context, in *sysin.ServeLicenseStatusInp) (err error)
|
||||
// AssignRouter 分配服务许可证路由
|
||||
AssignRouter(ctx context.Context, in *sysin.ServeLicenseAssignRouterInp) (err error)
|
||||
}
|
||||
ISysAddons interface {
|
||||
ISysDictData interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.DictDataDeleteInp) error
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.DictDataEditInp) (err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.AddonsListInp) (list []*sysin.AddonsListModel, totalCount int, err error)
|
||||
// Selects 选项
|
||||
Selects(ctx context.Context, in *sysin.AddonsSelectsInp) (res *sysin.AddonsSelectsModel, err error)
|
||||
// Build 提交生成
|
||||
Build(ctx context.Context, in *sysin.AddonsBuildInp) (err error)
|
||||
// Install 安装模块
|
||||
Install(ctx context.Context, in *sysin.AddonsInstallInp) (err error)
|
||||
// Upgrade 更新模块
|
||||
Upgrade(ctx context.Context, in *sysin.AddonsUpgradeInp) (err error)
|
||||
// UnInstall 卸载模块
|
||||
UnInstall(ctx context.Context, in *sysin.AddonsUnInstallInp) (err error)
|
||||
}
|
||||
ISysAttachment interface {
|
||||
// Model ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// Delete 删除附件
|
||||
Delete(ctx context.Context, in *sysin.AttachmentDeleteInp) (err error)
|
||||
// View 获取附件信息
|
||||
View(ctx context.Context, in *sysin.AttachmentViewInp) (res *sysin.AttachmentViewModel, err error)
|
||||
// List 获取附件列表
|
||||
List(ctx context.Context, in *sysin.AttachmentListInp) (list []*sysin.AttachmentListModel, totalCount int, err error)
|
||||
// ClearKind 清空上传类型
|
||||
ClearKind(ctx context.Context, in *sysin.AttachmentClearKindInp) (err error)
|
||||
}
|
||||
ISysCurdDemo interface {
|
||||
// Model 生成演示ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// List 获取生成演示列表
|
||||
List(ctx context.Context, in *sysin.CurdDemoListInp) (list []*sysin.CurdDemoListModel, totalCount int, err error)
|
||||
// Export 导出生成演示
|
||||
Export(ctx context.Context, in *sysin.CurdDemoListInp) (err error)
|
||||
// Edit 修改/新增生成演示
|
||||
Edit(ctx context.Context, in *sysin.CurdDemoEditInp) (err error)
|
||||
// Delete 删除生成演示
|
||||
Delete(ctx context.Context, in *sysin.CurdDemoDeleteInp) (err error)
|
||||
// MaxSort 获取生成演示最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.CurdDemoMaxSortInp) (res *sysin.CurdDemoMaxSortModel, err error)
|
||||
// View 获取生成演示指定信息
|
||||
View(ctx context.Context, in *sysin.CurdDemoViewInp) (res *sysin.CurdDemoViewModel, err error)
|
||||
// Status 更新生成演示状态
|
||||
Status(ctx context.Context, in *sysin.CurdDemoStatusInp) (err error)
|
||||
// Switch 更新生成演示开关
|
||||
Switch(ctx context.Context, in *sysin.CurdDemoSwitchInp) (err error)
|
||||
List(ctx context.Context, in *sysin.DictDataListInp) (list []*sysin.DictDataListModel, totalCount int, err error)
|
||||
// GetId 获取指定类型的ID
|
||||
GetId(ctx context.Context, t string) (id int64, err error)
|
||||
// GetType 获取指定ID的类型标识
|
||||
GetType(ctx context.Context, id int64) (types string, err error)
|
||||
// GetTypes 获取指定ID的所有类型标识,包含下级
|
||||
GetTypes(ctx context.Context, id int64) (types []string, err error)
|
||||
// Select 获取列表
|
||||
Select(ctx context.Context, in *sysin.DataSelectInp) (list sysin.DataSelectModel, err error)
|
||||
}
|
||||
ISysGenCodes interface {
|
||||
// Delete 删除
|
||||
@ -206,96 +231,49 @@ type (
|
||||
// Build 提交生成
|
||||
Build(ctx context.Context, in *sysin.GenCodesBuildInp) (err error)
|
||||
}
|
||||
ISysCron interface {
|
||||
StartCron(ctx context.Context)
|
||||
ISysSmsLog interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.CronDeleteInp) (err error)
|
||||
Delete(ctx context.Context, in *sysin.SmsLogDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.CronEditInp) (err error)
|
||||
// Status 更新状态
|
||||
Status(ctx context.Context, in *sysin.CronStatusInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.CronMaxSortInp) (res *sysin.CronMaxSortModel, err error)
|
||||
// View 获取指定信息
|
||||
View(ctx context.Context, in *sysin.CronViewInp) (res *sysin.CronViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.CronListInp) (list []*sysin.CronListModel, totalCount int, err error)
|
||||
// OnlineExec 在线执行
|
||||
OnlineExec(ctx context.Context, in *sysin.OnlineExecInp) (err error)
|
||||
}
|
||||
ISysCronGroup interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.CronGroupDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.CronGroupEditInp) (err error)
|
||||
// Status 更新状态
|
||||
Status(ctx context.Context, in *sysin.CronGroupStatusInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.CronGroupMaxSortInp) (res *sysin.CronGroupMaxSortModel, err error)
|
||||
// View 获取指定信息
|
||||
View(ctx context.Context, in *sysin.CronGroupViewInp) (res *sysin.CronGroupViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.CronGroupListInp) (list []*sysin.CronGroupListModel, totalCount int, err error)
|
||||
// Select 选项
|
||||
Select(ctx context.Context, in *sysin.CronGroupSelectInp) (res *sysin.CronGroupSelectModel, err error)
|
||||
}
|
||||
ISysDictData interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.DictDataDeleteInp) error
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.DictDataEditInp) (err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.DictDataListInp) (list []*sysin.DictDataListModel, totalCount int, err error)
|
||||
// Select 获取列表
|
||||
Select(ctx context.Context, in *sysin.DataSelectInp) (list sysin.DataSelectModel, err error)
|
||||
}
|
||||
ISysDictType interface {
|
||||
// Tree 树
|
||||
Tree(ctx context.Context) (list []*sysin.DictTypeTree, err error)
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.DictTypeDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.DictTypeEditInp) (err error)
|
||||
// TreeSelect 获取类型关系树选项
|
||||
TreeSelect(ctx context.Context, in *sysin.DictTreeSelectInp) (list []*sysin.DictTypeTree, err error)
|
||||
}
|
||||
ISysLog interface {
|
||||
// Export 导出
|
||||
Export(ctx context.Context, in *sysin.LogListInp) (err error)
|
||||
// RealWrite 真实写入
|
||||
RealWrite(ctx context.Context, log entity.SysLog) (err error)
|
||||
// AutoLog 根据配置自动记录请求日志
|
||||
AutoLog(ctx context.Context) error
|
||||
// AnalysisLog 解析日志数据
|
||||
AnalysisLog(ctx context.Context) entity.SysLog
|
||||
Edit(ctx context.Context, in *sysin.SmsLogEditInp) (err error)
|
||||
// Status 更新短信状态
|
||||
Status(ctx context.Context, in *sysin.SmsLogStatusInp) (err error)
|
||||
// View 获取指定字典类型信息
|
||||
View(ctx context.Context, in *sysin.LogViewInp) (res *sysin.LogViewModel, err error)
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.LogDeleteInp) (err error)
|
||||
// List 列表
|
||||
List(ctx context.Context, in *sysin.LogListInp) (list []*sysin.LogListModel, totalCount int, err error)
|
||||
}
|
||||
ISysProvinces interface {
|
||||
// Tree 关系树选项列表
|
||||
Tree(ctx context.Context) (list []*sysin.ProvincesTree, err error)
|
||||
// Delete 删除省市区数据
|
||||
Delete(ctx context.Context, in *sysin.ProvincesDeleteInp) (err error)
|
||||
// Edit 修改/新增省市区数据
|
||||
Edit(ctx context.Context, in *sysin.ProvincesEditInp) (err error)
|
||||
// Status 更新省市区状态
|
||||
Status(ctx context.Context, in *sysin.ProvincesStatusInp) (err error)
|
||||
// MaxSort 最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.ProvincesMaxSortInp) (res *sysin.ProvincesMaxSortModel, err error)
|
||||
// View 获取省市区信息
|
||||
View(ctx context.Context, in *sysin.ProvincesViewInp) (res *sysin.ProvincesViewModel, err error)
|
||||
View(ctx context.Context, in *sysin.SmsLogViewInp) (res *sysin.SmsLogViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.ProvincesListInp) (list []*sysin.ProvincesListModel, totalCount int, err error)
|
||||
// ChildrenList 获取省市区下级列表
|
||||
ChildrenList(ctx context.Context, in *sysin.ProvincesChildrenListInp) (list []*sysin.ProvincesChildrenListModel, totalCount int, err error)
|
||||
// UniqueId 获取省市区下级列表
|
||||
UniqueId(ctx context.Context, in *sysin.ProvincesUniqueIdInp) (res *sysin.ProvincesUniqueIdModel, err error)
|
||||
// Select 省市区选项
|
||||
Select(ctx context.Context, in *sysin.ProvincesSelectInp) (res *sysin.ProvincesSelectModel, err error)
|
||||
List(ctx context.Context, in *sysin.SmsLogListInp) (list []*sysin.SmsLogListModel, totalCount int, err error)
|
||||
// SendCode 发送验证码
|
||||
SendCode(ctx context.Context, in *sysin.SendCodeInp) (err error)
|
||||
// GetTemplate 获取指定短信模板
|
||||
GetTemplate(ctx context.Context, template string, config *model.SmsConfig) (val string, err error)
|
||||
// AllowSend 是否允许发送
|
||||
AllowSend(ctx context.Context, models *entity.SysSmsLog, config *model.SmsConfig) (err error)
|
||||
// NowDayCount 当天发送次数
|
||||
NowDayCount(ctx context.Context, event, mobile string) (count int, err error)
|
||||
// VerifyCode 效验验证码
|
||||
VerifyCode(ctx context.Context, in *sysin.VerifyCodeInp) (err error)
|
||||
}
|
||||
ISysAddons interface {
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.AddonsListInp) (list []*sysin.AddonsListModel, totalCount int, err error)
|
||||
// Selects 选项
|
||||
Selects(ctx context.Context, in *sysin.AddonsSelectsInp) (res *sysin.AddonsSelectsModel, err error)
|
||||
// Build 提交生成
|
||||
Build(ctx context.Context, in *sysin.AddonsBuildInp) (err error)
|
||||
// Install 安装模块
|
||||
Install(ctx context.Context, in *sysin.AddonsInstallInp) (err error)
|
||||
// Upgrade 更新模块
|
||||
Upgrade(ctx context.Context, in *sysin.AddonsUpgradeInp) (err error)
|
||||
// UnInstall 卸载模块
|
||||
UnInstall(ctx context.Context, in *sysin.AddonsUnInstallInp) (err error)
|
||||
}
|
||||
ISysAddonsConfig interface {
|
||||
// GetConfigByGroup 获取指定分组的配置
|
||||
GetConfigByGroup(ctx context.Context, in *sysin.GetAddonsConfigInp) (res *sysin.GetAddonsConfigModel, err error)
|
||||
// ConversionType 转换类型
|
||||
ConversionType(ctx context.Context, models *entity.SysAddonsConfig) (value interface{}, err error)
|
||||
// UpdateConfigByGroup 更新指定分组的配置
|
||||
UpdateConfigByGroup(ctx context.Context, in *sysin.UpdateAddonsConfigInp) (err error)
|
||||
}
|
||||
ISysServeLog interface {
|
||||
// Model 服务日志Orm模型
|
||||
@ -311,14 +289,6 @@ type (
|
||||
// RealWrite 真实写入
|
||||
RealWrite(ctx context.Context, models entity.SysServeLog) (err error)
|
||||
}
|
||||
ISysAddonsConfig interface {
|
||||
// GetConfigByGroup 获取指定分组的配置
|
||||
GetConfigByGroup(ctx context.Context, in *sysin.GetAddonsConfigInp) (res *sysin.GetAddonsConfigModel, err error)
|
||||
// ConversionType 转换类型
|
||||
ConversionType(ctx context.Context, models *entity.SysAddonsConfig) (value interface{}, err error)
|
||||
// UpdateConfigByGroup 更新指定分组的配置
|
||||
UpdateConfigByGroup(ctx context.Context, in *sysin.UpdateAddonsConfigInp) (err error)
|
||||
}
|
||||
ISysBlacklist interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.BlacklistDeleteInp) (err error)
|
||||
@ -339,93 +309,80 @@ type (
|
||||
// ClusterSync 集群同步
|
||||
ClusterSync(ctx context.Context, message *gredis.Message)
|
||||
}
|
||||
ISysCurdDemo interface {
|
||||
// Model 生成演示ORM模型
|
||||
Model(ctx context.Context, option ...*handler.Option) *gdb.Model
|
||||
// List 获取生成演示列表
|
||||
List(ctx context.Context, in *sysin.CurdDemoListInp) (list []*sysin.CurdDemoListModel, totalCount int, err error)
|
||||
// Export 导出生成演示
|
||||
Export(ctx context.Context, in *sysin.CurdDemoListInp) (err error)
|
||||
// Edit 修改/新增生成演示
|
||||
Edit(ctx context.Context, in *sysin.CurdDemoEditInp) (err error)
|
||||
// Delete 删除生成演示
|
||||
Delete(ctx context.Context, in *sysin.CurdDemoDeleteInp) (err error)
|
||||
// MaxSort 获取生成演示最大排序
|
||||
MaxSort(ctx context.Context, in *sysin.CurdDemoMaxSortInp) (res *sysin.CurdDemoMaxSortModel, err error)
|
||||
// View 获取生成演示指定信息
|
||||
View(ctx context.Context, in *sysin.CurdDemoViewInp) (res *sysin.CurdDemoViewModel, err error)
|
||||
// Status 更新生成演示状态
|
||||
Status(ctx context.Context, in *sysin.CurdDemoStatusInp) (err error)
|
||||
// Switch 更新生成演示开关
|
||||
Switch(ctx context.Context, in *sysin.CurdDemoSwitchInp) (err error)
|
||||
}
|
||||
ISysEmsLog interface {
|
||||
// Delete 删除
|
||||
Delete(ctx context.Context, in *sysin.EmsLogDeleteInp) (err error)
|
||||
// Edit 修改/新增
|
||||
Edit(ctx context.Context, in *sysin.EmsLogEditInp) (err error)
|
||||
// Status 更新部门状态
|
||||
Status(ctx context.Context, in *sysin.EmsLogStatusInp) (err error)
|
||||
// View 获取指定字典类型信息
|
||||
View(ctx context.Context, in *sysin.EmsLogViewInp) (res *sysin.EmsLogViewModel, err error)
|
||||
// List 获取列表
|
||||
List(ctx context.Context, in *sysin.EmsLogListInp) (list []*sysin.EmsLogListModel, totalCount int, err error)
|
||||
// Send 发送邮件
|
||||
Send(ctx context.Context, in *sysin.SendEmsInp) (err error)
|
||||
// GetTemplate 获取指定邮件模板
|
||||
GetTemplate(ctx context.Context, template string, config *model.EmailConfig) (val string, err error)
|
||||
// AllowSend 是否允许发送
|
||||
AllowSend(ctx context.Context, models *entity.SysEmsLog, config *model.EmailConfig) (err error)
|
||||
// NowDayCount 当天发送次数
|
||||
NowDayCount(ctx context.Context, event, email string) (count int, err error)
|
||||
// VerifyCode 效验验证码
|
||||
VerifyCode(ctx context.Context, in *sysin.VerifyEmsCodeInp) (err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localSysConfig ISysConfig
|
||||
localSysEmsLog ISysEmsLog
|
||||
localSysServeLicense ISysServeLicense
|
||||
localSysSmsLog ISysSmsLog
|
||||
localSysAddons ISysAddons
|
||||
localSysAttachment ISysAttachment
|
||||
localSysLoginLog ISysLoginLog
|
||||
localSysCron ISysCron
|
||||
localSysCronGroup ISysCronGroup
|
||||
localSysCurdDemo ISysCurdDemo
|
||||
localSysGenCodes ISysGenCodes
|
||||
localSysProvinces ISysProvinces
|
||||
localSysServeLog ISysServeLog
|
||||
localSysAddonsConfig ISysAddonsConfig
|
||||
localSysBlacklist ISysBlacklist
|
||||
localSysDictData ISysDictData
|
||||
localSysDictType ISysDictType
|
||||
localSysLog ISysLog
|
||||
localSysLoginLog ISysLoginLog
|
||||
localSysProvinces ISysProvinces
|
||||
localSysAttachment ISysAttachment
|
||||
localSysConfig ISysConfig
|
||||
localSysServeLicense ISysServeLicense
|
||||
localSysSmsLog ISysSmsLog
|
||||
localSysDictData ISysDictData
|
||||
localSysGenCodes ISysGenCodes
|
||||
localSysAddons ISysAddons
|
||||
localSysAddonsConfig ISysAddonsConfig
|
||||
localSysEmsLog ISysEmsLog
|
||||
localSysServeLog ISysServeLog
|
||||
localSysBlacklist ISysBlacklist
|
||||
localSysCurdDemo ISysCurdDemo
|
||||
)
|
||||
|
||||
func SysAddons() ISysAddons {
|
||||
if localSysAddons == nil {
|
||||
panic("implement not found for interface ISysAddons, forgot register?")
|
||||
func SysDictData() ISysDictData {
|
||||
if localSysDictData == nil {
|
||||
panic("implement not found for interface ISysDictData, forgot register?")
|
||||
}
|
||||
return localSysAddons
|
||||
return localSysDictData
|
||||
}
|
||||
|
||||
func RegisterSysAddons(i ISysAddons) {
|
||||
localSysAddons = i
|
||||
}
|
||||
|
||||
func SysAttachment() ISysAttachment {
|
||||
if localSysAttachment == nil {
|
||||
panic("implement not found for interface ISysAttachment, forgot register?")
|
||||
}
|
||||
return localSysAttachment
|
||||
}
|
||||
|
||||
func RegisterSysAttachment(i ISysAttachment) {
|
||||
localSysAttachment = i
|
||||
}
|
||||
|
||||
func SysLoginLog() ISysLoginLog {
|
||||
if localSysLoginLog == nil {
|
||||
panic("implement not found for interface ISysLoginLog, forgot register?")
|
||||
}
|
||||
return localSysLoginLog
|
||||
}
|
||||
|
||||
func RegisterSysLoginLog(i ISysLoginLog) {
|
||||
localSysLoginLog = i
|
||||
}
|
||||
|
||||
func SysCron() ISysCron {
|
||||
if localSysCron == nil {
|
||||
panic("implement not found for interface ISysCron, forgot register?")
|
||||
}
|
||||
return localSysCron
|
||||
}
|
||||
|
||||
func RegisterSysCron(i ISysCron) {
|
||||
localSysCron = i
|
||||
}
|
||||
|
||||
func SysCronGroup() ISysCronGroup {
|
||||
if localSysCronGroup == nil {
|
||||
panic("implement not found for interface ISysCronGroup, forgot register?")
|
||||
}
|
||||
return localSysCronGroup
|
||||
}
|
||||
|
||||
func RegisterSysCronGroup(i ISysCronGroup) {
|
||||
localSysCronGroup = i
|
||||
}
|
||||
|
||||
func SysCurdDemo() ISysCurdDemo {
|
||||
if localSysCurdDemo == nil {
|
||||
panic("implement not found for interface ISysCurdDemo, forgot register?")
|
||||
}
|
||||
return localSysCurdDemo
|
||||
}
|
||||
|
||||
func RegisterSysCurdDemo(i ISysCurdDemo) {
|
||||
localSysCurdDemo = i
|
||||
func RegisterSysDictData(i ISysDictData) {
|
||||
localSysDictData = i
|
||||
}
|
||||
|
||||
func SysGenCodes() ISysGenCodes {
|
||||
@ -439,26 +396,26 @@ func RegisterSysGenCodes(i ISysGenCodes) {
|
||||
localSysGenCodes = i
|
||||
}
|
||||
|
||||
func SysProvinces() ISysProvinces {
|
||||
if localSysProvinces == nil {
|
||||
panic("implement not found for interface ISysProvinces, forgot register?")
|
||||
func SysSmsLog() ISysSmsLog {
|
||||
if localSysSmsLog == nil {
|
||||
panic("implement not found for interface ISysSmsLog, forgot register?")
|
||||
}
|
||||
return localSysProvinces
|
||||
return localSysSmsLog
|
||||
}
|
||||
|
||||
func RegisterSysProvinces(i ISysProvinces) {
|
||||
localSysProvinces = i
|
||||
func RegisterSysSmsLog(i ISysSmsLog) {
|
||||
localSysSmsLog = i
|
||||
}
|
||||
|
||||
func SysServeLog() ISysServeLog {
|
||||
if localSysServeLog == nil {
|
||||
panic("implement not found for interface ISysServeLog, forgot register?")
|
||||
func SysAddons() ISysAddons {
|
||||
if localSysAddons == nil {
|
||||
panic("implement not found for interface ISysAddons, forgot register?")
|
||||
}
|
||||
return localSysServeLog
|
||||
return localSysAddons
|
||||
}
|
||||
|
||||
func RegisterSysServeLog(i ISysServeLog) {
|
||||
localSysServeLog = i
|
||||
func RegisterSysAddons(i ISysAddons) {
|
||||
localSysAddons = i
|
||||
}
|
||||
|
||||
func SysAddonsConfig() ISysAddonsConfig {
|
||||
@ -472,6 +429,17 @@ func RegisterSysAddonsConfig(i ISysAddonsConfig) {
|
||||
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 SysBlacklist() ISysBlacklist {
|
||||
if localSysBlacklist == nil {
|
||||
panic("implement not found for interface ISysBlacklist, forgot register?")
|
||||
@ -483,15 +451,37 @@ func RegisterSysBlacklist(i ISysBlacklist) {
|
||||
localSysBlacklist = i
|
||||
}
|
||||
|
||||
func SysDictData() ISysDictData {
|
||||
if localSysDictData == nil {
|
||||
panic("implement not found for interface ISysDictData, forgot register?")
|
||||
func SysCurdDemo() ISysCurdDemo {
|
||||
if localSysCurdDemo == nil {
|
||||
panic("implement not found for interface ISysCurdDemo, forgot register?")
|
||||
}
|
||||
return localSysDictData
|
||||
return localSysCurdDemo
|
||||
}
|
||||
|
||||
func RegisterSysDictData(i ISysDictData) {
|
||||
localSysDictData = i
|
||||
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 SysCronGroup() ISysCronGroup {
|
||||
if localSysCronGroup == nil {
|
||||
panic("implement not found for interface ISysCronGroup, forgot register?")
|
||||
}
|
||||
return localSysCronGroup
|
||||
}
|
||||
|
||||
func RegisterSysCronGroup(i ISysCronGroup) {
|
||||
localSysCronGroup = i
|
||||
}
|
||||
|
||||
func SysDictType() ISysDictType {
|
||||
@ -516,6 +506,39 @@ func RegisterSysLog(i ISysLog) {
|
||||
localSysLog = i
|
||||
}
|
||||
|
||||
func SysLoginLog() ISysLoginLog {
|
||||
if localSysLoginLog == nil {
|
||||
panic("implement not found for interface ISysLoginLog, forgot register?")
|
||||
}
|
||||
return localSysLoginLog
|
||||
}
|
||||
|
||||
func RegisterSysLoginLog(i ISysLoginLog) {
|
||||
localSysLoginLog = i
|
||||
}
|
||||
|
||||
func SysProvinces() ISysProvinces {
|
||||
if localSysProvinces == nil {
|
||||
panic("implement not found for interface ISysProvinces, forgot register?")
|
||||
}
|
||||
return localSysProvinces
|
||||
}
|
||||
|
||||
func RegisterSysProvinces(i ISysProvinces) {
|
||||
localSysProvinces = i
|
||||
}
|
||||
|
||||
func SysAttachment() ISysAttachment {
|
||||
if localSysAttachment == nil {
|
||||
panic("implement not found for interface ISysAttachment, forgot register?")
|
||||
}
|
||||
return localSysAttachment
|
||||
}
|
||||
|
||||
func RegisterSysAttachment(i ISysAttachment) {
|
||||
localSysAttachment = i
|
||||
}
|
||||
|
||||
func SysConfig() ISysConfig {
|
||||
if localSysConfig == nil {
|
||||
panic("implement not found for interface ISysConfig, forgot register?")
|
||||
@ -527,15 +550,15 @@ func RegisterSysConfig(i ISysConfig) {
|
||||
localSysConfig = i
|
||||
}
|
||||
|
||||
func SysEmsLog() ISysEmsLog {
|
||||
if localSysEmsLog == nil {
|
||||
panic("implement not found for interface ISysEmsLog, forgot register?")
|
||||
func SysCron() ISysCron {
|
||||
if localSysCron == nil {
|
||||
panic("implement not found for interface ISysCron, forgot register?")
|
||||
}
|
||||
return localSysEmsLog
|
||||
return localSysCron
|
||||
}
|
||||
|
||||
func RegisterSysEmsLog(i ISysEmsLog) {
|
||||
localSysEmsLog = i
|
||||
func RegisterSysCron(i ISysCron) {
|
||||
localSysCron = i
|
||||
}
|
||||
|
||||
func SysServeLicense() ISysServeLicense {
|
||||
@ -548,14 +571,3 @@ func SysServeLicense() ISysServeLicense {
|
||||
func RegisterSysServeLicense(i ISysServeLicense) {
|
||||
localSysServeLicense = i
|
||||
}
|
||||
|
||||
func SysSmsLog() ISysSmsLog {
|
||||
if localSysSmsLog == nil {
|
||||
panic("implement not found for interface ISysSmsLog, forgot register?")
|
||||
}
|
||||
return localSysSmsLog
|
||||
}
|
||||
|
||||
func RegisterSysSmsLog(i ISysSmsLog) {
|
||||
localSysSmsLog = i
|
||||
}
|
||||
|
@ -36,6 +36,7 @@
|
||||
const useUserStore = useUserStoreWidthOut();
|
||||
const uploadHeaders = reactive({
|
||||
Authorization: useUserStore.token,
|
||||
uploadType: 'default',
|
||||
});
|
||||
const emit = defineEmits(['update:value']);
|
||||
const props = withDefaults(defineProps<Props>(), { value: '', maxNumber: 1, helpText: '' });
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<BasicUpload
|
||||
:action="`${uploadUrl}${urlPrefix}/upload/image`"
|
||||
:action="`${uploadUrl}${urlPrefix}/upload/file`"
|
||||
:headers="uploadHeaders"
|
||||
:data="{ type: 0 }"
|
||||
name="file"
|
||||
@ -36,6 +36,7 @@
|
||||
const useUserStore = useUserStoreWidthOut();
|
||||
const uploadHeaders = reactive({
|
||||
Authorization: useUserStore.token,
|
||||
uploadType: 'image',
|
||||
});
|
||||
|
||||
function uploadChange(list: string | string[]) {
|
||||
|
@ -53,9 +53,9 @@ export const columns = [
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '登录地址',
|
||||
key: 'addr',
|
||||
width: 150,
|
||||
title: '登录IP',
|
||||
key: 'ip',
|
||||
width: 120,
|
||||
},
|
||||
|
||||
// {
|
||||
|
@ -57,11 +57,11 @@
|
||||
rules: [{ trigger: ['blur'] }],
|
||||
},
|
||||
{
|
||||
field: 'addr',
|
||||
field: 'ip',
|
||||
component: 'NInput',
|
||||
label: '登录地址',
|
||||
label: '登录IP',
|
||||
componentProps: {
|
||||
placeholder: '请输入登录地址',
|
||||
placeholder: '请输入登录IP',
|
||||
onInput: (e: any) => {
|
||||
console.log(e);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user