style: 优化部分文件中的函数及类注释

This commit is contained in:
insistence
2024-07-13 18:15:35 +08:00
parent c23a3ccfaf
commit e3b422cc6e
41 changed files with 353 additions and 19 deletions

View File

@@ -17,6 +17,7 @@ class DeptDao:
async def get_dept_by_id(cls, db: AsyncSession, dept_id: int):
"""
根据部门id获取在用部门信息
:param db: orm对象
:param dept_id: 部门id
:return: 在用部门信息对象
@@ -29,6 +30,7 @@ class DeptDao:
async def get_dept_detail_by_id(cls, db: AsyncSession, dept_id: int):
"""
根据部门id获取部门详细信息
:param db: orm对象
:param dept_id: 部门id
:return: 部门信息对象
@@ -45,6 +47,7 @@ class DeptDao:
async def get_dept_detail_by_info(cls, db: AsyncSession, dept: DeptModel):
"""
根据部门参数获取部门信息
:param db: orm对象
:param dept: 部门参数对象
:return: 部门信息对象
@@ -68,6 +71,7 @@ class DeptDao:
async def get_dept_info_for_edit_option(cls, db: AsyncSession, dept_info: DeptModel, data_scope_sql: str):
"""
获取部门编辑对应的在用部门列表信息
:param db: orm对象
:param dept_info: 部门对象
:param data_scope_sql: 数据权限对应的查询sql语句
@@ -100,6 +104,7 @@ class DeptDao:
async def get_children_dept_dao(cls, db: AsyncSession, dept_id: int):
"""
根据部门id查询当前部门的子部门列表信息
:param db: orm对象
:param dept_id: 部门id
:return: 子部门信息列表
@@ -114,6 +119,7 @@ class DeptDao:
async def get_dept_list_for_tree(cls, db: AsyncSession, dept_info: DeptModel, data_scope_sql: str):
"""
获取所有在用部门列表信息
:param db: orm对象
:param dept_info: 部门对象
:param data_scope_sql: 数据权限对应的查询sql语句
@@ -143,6 +149,7 @@ class DeptDao:
async def get_dept_list(cls, db: AsyncSession, page_object: DeptModel, data_scope_sql: str):
"""
根据查询参数获取部门列表信息
:param db: orm对象
:param page_object: 不分页查询参数对象
:param data_scope_sql: 数据权限对应的查询sql语句
@@ -172,6 +179,7 @@ class DeptDao:
async def add_dept_dao(cls, db: AsyncSession, dept: DeptModel):
"""
新增部门数据库操作
:param db: orm对象
:param dept: 部门对象
:return: 新增校验结果
@@ -186,6 +194,7 @@ class DeptDao:
async def edit_dept_dao(cls, db: AsyncSession, dept: dict):
"""
编辑部门数据库操作
:param db: orm对象
:param dept: 需要更新的部门字典
:return: 编辑校验结果
@@ -196,6 +205,7 @@ class DeptDao:
async def update_dept_children_dao(cls, db: AsyncSession, update_dept: List):
"""
更新子部门信息
:param db: orm对象
:param update_dept: 需要更新的部门列表
:return:
@@ -217,6 +227,7 @@ class DeptDao:
async def update_dept_status_normal_dao(cls, db: AsyncSession, dept_id_list: List):
"""
批量更新部门状态为正常
:param db: orm对象
:param dept_id_list: 部门id列表
:return:
@@ -227,6 +238,7 @@ class DeptDao:
async def delete_dept_dao(cls, db: AsyncSession, dept: DeptModel):
"""
删除部门数据库操作
:param db: orm对象
:param dept: 部门对象
:return:
@@ -241,6 +253,7 @@ class DeptDao:
async def count_normal_children_dept_dao(cls, db: AsyncSession, dept_id: int):
"""
根据部门id查询查询所有子部门正常状态的数量
:param db: orm对象
:param dept_id: 部门id
:return: 所有子部门(正常状态)的数量
@@ -259,6 +272,7 @@ class DeptDao:
async def count_children_dept_dao(cls, db: AsyncSession, dept_id: int):
"""
根据部门id查询查询所有子部门所有状态的数量
:param db: orm对象
:param dept_id: 部门id
:return: 所有子部门(所有状态)的数量
@@ -278,6 +292,7 @@ class DeptDao:
async def count_dept_user_dao(cls, db: AsyncSession, dept_id: int):
"""
根据部门id查询查询部门下的用户数量
:param db: orm对象
:param dept_id: 部门id
:return: 部门下的用户数量