新增冒险查看倒计时

This commit is contained in:
2025-11-12 16:37:10 +08:00
parent 8fd8850ecf
commit b59931adcf
3 changed files with 91 additions and 5 deletions

View File

@@ -639,6 +639,18 @@ class CombatService:
row = cursor.fetchone()
return dict(row) if row else None
def get_adventure_by_id(self, adventure_id: int) -> Optional[Dict[str, Any]]:
"""
根据冒险ID获取冒险记录
"""
cursor = self._db.conn.cursor()
cursor.execute(
"SELECT * FROM combat_adventure_records WHERE adventure_id = ?",
(adventure_id,),
)
row = cursor.fetchone()
return dict(row) if row else None
def start_adventure(
self,
user_id: int,