Update the dict plugin table structure (#817)

* Update the dict plugin table structure

* Update dict sql

* FIx the dict plugin sql
This commit is contained in:
Wu Clan
2025-09-15 09:04:30 +08:00
committed by GitHub
parent 82b2f808ac
commit 3efca8af37
15 changed files with 241 additions and 169 deletions
@@ -29,6 +29,20 @@ class DictDataService:
raise errors.NotFoundError(msg='字典数据不存在')
return dict_data
@staticmethod
async def get_by_type_code(*, code: str) -> Sequence[DictData]:
"""
获取字典数据详情
:param code: 字典类型编码
:return:
"""
async with async_db_session() as db:
dict_datas = await dict_data_dao.get_by_type_code(db, code)
if not dict_datas:
raise errors.NotFoundError(msg='字典数据不存在')
return dict_datas
@staticmethod
async def get_all() -> Sequence[DictData]:
async with async_db_session() as db: