feat: add tenant-aware IM management console
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
// 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/imrealname"
|
||||
"hotgo/internal/model/input/sysin"
|
||||
"hotgo/internal/service"
|
||||
)
|
||||
|
||||
var (
|
||||
ImRealname = cImRealname{}
|
||||
)
|
||||
|
||||
type cImRealname struct{}
|
||||
|
||||
// List 查看IM实名审核列表
|
||||
func (c *cImRealname) List(ctx context.Context, req *imrealname.ListReq) (res *imrealname.ListRes, err error) {
|
||||
list, totalCount, err := service.SysImRealname().List(ctx, &req.ImRealnameListInp)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if list == nil {
|
||||
list = []*sysin.ImRealnameListModel{}
|
||||
}
|
||||
|
||||
res = new(imrealname.ListRes)
|
||||
res.List = list
|
||||
res.PageRes.Pack(req, totalCount)
|
||||
return
|
||||
}
|
||||
|
||||
// View 获取指定IM实名审核信息
|
||||
func (c *cImRealname) View(ctx context.Context, req *imrealname.ViewReq) (res *imrealname.ViewRes, err error) {
|
||||
data, err := service.SysImRealname().View(ctx, &req.ImRealnameViewInp)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
res = new(imrealname.ViewRes)
|
||||
res.ImRealnameViewModel = data
|
||||
return
|
||||
}
|
||||
|
||||
// Review 审核IM实名
|
||||
func (c *cImRealname) Review(ctx context.Context, req *imrealname.ReviewReq) (res *imrealname.ReviewRes, err error) {
|
||||
err = service.SysImRealname().Review(ctx, &req.ImRealnameReviewInp)
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user