【新增】部门岗位租户功能

This commit is contained in:
PandaGoAdmin
2022-07-23 09:41:52 +08:00
parent ae38e7bcef
commit 59dbf51c73
11 changed files with 90 additions and 20 deletions

View File

@@ -50,6 +50,9 @@ func (m *sysPostModelImpl) FindListPage(page, pageSize int, data entity.SysPost)
if data.PostName != "" {
db = db.Where("post_name like ?", "%"+data.PostName+"%")
}
if data.TenantId != 0 {
db = db.Where("tenant_id = ?", data.TenantId)
}
if data.PostCode != "" {
db = db.Where("post_code like ?", "%"+data.PostCode+"%")
}
@@ -73,6 +76,9 @@ func (m *sysPostModelImpl) FindList(data entity.SysPost) *[]entity.SysPost {
if data.PostName != "" {
db = db.Where("post_name = ?", data.PostName)
}
if data.TenantId != 0 {
db = db.Where("tenant_id = ?", data.TenantId)
}
if data.PostCode != "" {
db = db.Where("post_code = ?", data.PostCode)
}