mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-10 03:03:44 +08:00
发布v2.3.5版本,本次为优化版本。更新内容请查看:https://github.com/bufanyun/hotgo/blob/v2.0/docs/guide-zh-CN/start-update-log.md
This commit is contained in:
@@ -90,23 +90,8 @@ func (c *cDept) List(ctx context.Context, req *dept.ListReq) (res *dept.ListRes,
|
||||
return
|
||||
}
|
||||
|
||||
res = (*dept.ListRes)(&data)
|
||||
return
|
||||
}
|
||||
|
||||
// ListTree 查看列表树
|
||||
func (c *cDept) ListTree(ctx context.Context, req *dept.ListTreeReq) (res *dept.ListTreeRes, err error) {
|
||||
var in adminin.DeptListTreeInp
|
||||
if err = gconv.Scan(req, &in); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
data, err := service.AdminDept().ListTree(ctx, in)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
res = (*dept.ListTreeRes)(&data)
|
||||
res = new(dept.ListRes)
|
||||
res.List = data.List
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import (
|
||||
"hotgo/internal/model/input/adminin"
|
||||
"hotgo/internal/model/input/form"
|
||||
"hotgo/internal/service"
|
||||
"hotgo/utility/validate"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -165,6 +166,10 @@ func (c *cMember) Edit(ctx context.Context, req *member.EditReq) (res *member.Ed
|
||||
return
|
||||
}
|
||||
|
||||
if err = validate.PreFilter(ctx, &in); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
in.PostIds = req.PostIds
|
||||
err = service.AdminMember().Edit(ctx, in)
|
||||
return
|
||||
|
||||
@@ -55,7 +55,7 @@ func (c *cRole) List(ctx context.Context, req *role.ListReq) (res *role.ListRes,
|
||||
}
|
||||
|
||||
res = new(role.ListRes)
|
||||
res.List = list
|
||||
res.RoleListModel = list
|
||||
res.PageCount = form.CalPageCount(totalCount, req.PerPage)
|
||||
res.Page = req.Page
|
||||
res.PerPage = req.PerPage
|
||||
|
||||
Reference in New Issue
Block a user