mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-25 15:38:34 +08:00
【新增】部门岗位租户功能
This commit is contained in:
@@ -37,6 +37,11 @@ func (p *PostApi) GetPostList(rc *ctx.ReqCtx) {
|
||||
postName := rc.GinCtx.Query("postName")
|
||||
postCode := rc.GinCtx.Query("postCode")
|
||||
post := entity.SysPost{Status: status, PostName: postName, PostCode: postCode}
|
||||
|
||||
if !IsTenantAdmin(rc.LoginAccount.TenantId) {
|
||||
post.TenantId = rc.LoginAccount.TenantId
|
||||
}
|
||||
|
||||
list, total := p.PostApp.FindListPage(pageNum, pageSize, post)
|
||||
|
||||
rc.ResData = map[string]any{
|
||||
@@ -72,7 +77,7 @@ func (p *PostApi) GetPost(rc *ctx.ReqCtx) {
|
||||
func (p *PostApi) InsertPost(rc *ctx.ReqCtx) {
|
||||
var post entity.SysPost
|
||||
ginx.BindJsonAndValid(rc.GinCtx, &post)
|
||||
|
||||
post.TenantId = rc.LoginAccount.TenantId
|
||||
post.CreateBy = rc.LoginAccount.UserName
|
||||
p.PostApp.Insert(post)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user