feat: add IM admin management
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
// Package sys
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2026 HotGo
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package sys
|
||||
|
||||
import (
|
||||
"context"
|
||||
"hotgo/api/admin/imauditlog"
|
||||
"hotgo/internal/model/input/sysin"
|
||||
"hotgo/internal/service"
|
||||
)
|
||||
|
||||
var ImAuditLog = cImAuditLog{}
|
||||
|
||||
type cImAuditLog struct{}
|
||||
|
||||
// List 查看IM审计日志列表
|
||||
func (c *cImAuditLog) List(ctx context.Context, req *imauditlog.ListReq) (res *imauditlog.ListRes, err error) {
|
||||
list, totalCount, err := service.SysImAuditLog().List(ctx, &req.ImAuditLogListInp)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if list == nil {
|
||||
list = []*sysin.ImAuditLogListModel{}
|
||||
}
|
||||
res = new(imauditlog.ListRes)
|
||||
res.List = list
|
||||
res.PageRes.Pack(req, totalCount)
|
||||
return
|
||||
}
|
||||
|
||||
// View 获取指定IM审计日志信息
|
||||
func (c *cImAuditLog) View(ctx context.Context, req *imauditlog.ViewReq) (res *imauditlog.ViewRes, err error) {
|
||||
data, err := service.SysImAuditLog().View(ctx, &req.ImAuditLogViewInp)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
res = new(imauditlog.ViewRes)
|
||||
res.ImAuditLogViewModel = data
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user