1.修改get_all_section_by_account
This commit is contained in:
@@ -412,11 +412,12 @@ def get_all_section_by_account(request: SectionByAccountRequest, db: Session = D
|
||||
account_id = request.account_id
|
||||
section_service = SectionDataService()
|
||||
result_data = section_service.get_by_account_id(db, account_id=account_id)
|
||||
data_list = [item.to_dict() for item in result_data] if result_data else []
|
||||
return DataResponse(
|
||||
code=ResponseCode.SUCCESS,
|
||||
message="查询成功",
|
||||
total=len(result_data),
|
||||
data=result_data
|
||||
total=len(data_list),
|
||||
data=data_list
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"Query section data failed: {str(e)}")
|
||||
|
||||
Reference in New Issue
Block a user