This commit is contained in:
2025-11-01 17:33:26 +08:00
parent bd0815d0e7
commit 32c14c2e7b
15 changed files with 543 additions and 102 deletions

View File

@ -15,6 +15,14 @@ class ArtifactBll:
"""获取官片任务数据"""
return self.dal.get_top_artifact(5,"ArtifactID asc")
def get_artifacting_task(self) -> ArtifactInfoModel:
"""获取正在进行的官片任务数据"""
loc_item= self.dal.get_top_artifact(1,"","Status=2")
if loc_item:
return loc_item[0]
else:
return None
class PDRecordBll:
def __init__(self):
"""初始化数据访问层,创建数据库连接"""
@ -31,8 +39,10 @@ if __name__ == "__main__":
artifact_dal = ArtifactBll()
artifacts = artifact_dal.get_artifact_task()
print("\n打印artifacts数据:")
for i, artifact in enumerate(artifacts):
artifact_id = artifact.ArtifactID
# 如果是数据类对象,转换为字典输出
if hasattr(artifact, '__dataclass_fields__'):
print(f"{i+1}条: {artifact.__dict__}")