perf: 优化岗位管理模块分页查询

This commit is contained in:
insistence
2024-01-26 08:57:00 +08:00
parent 4cdbaa5157
commit ab7ea066c7
3 changed files with 13 additions and 13 deletions

View File

@@ -8,16 +8,17 @@ class PostService:
岗位管理模块服务层
"""
@classmethod
def get_post_list_services(cls, query_db: Session, query_object: PostModel):
def get_post_list_services(cls, query_db: Session, query_object: PostPageQueryModel, is_page: bool = False):
"""
获取岗位列表信息service
:param query_db: orm对象
:param query_object: 查询参数对象
:param is_page: 是否开启分页
:return: 岗位列表信息对象
"""
post_list_result = PostDao.get_post_list(query_db, query_object)
post_list_result = PostDao.get_post_list(query_db, query_object, is_page)
return CamelCaseUtil.transform_result(post_list_result)
return post_list_result
@classmethod
def add_post_services(cls, query_db: Session, page_object: PostModel):