feat: 도매상 API 통합 및 스키마 업데이트
- wholesale 패키지 연동 (SooinSession, GeoYoungSession) - Flask Blueprint 분리 (sooin_api.py, geoyoung_api.py) - order_context 스키마 확장 (wholesaler_id, internal_code 등) - 수인약품 개별 취소 기능 (cancel_item, restore_item) - 문서 추가: WHOLESALE_API_INTEGRATION.md - 테스트 스크립트들
This commit is contained in:
28
backend/check_paai_db.py
Normal file
28
backend/check_paai_db.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import sqlite3
|
||||
|
||||
conn = sqlite3.connect('db/paai_logs.db')
|
||||
|
||||
# 테이블 목록
|
||||
cursor = conn.execute("SELECT name FROM sqlite_master WHERE type='table'")
|
||||
tables = cursor.fetchall()
|
||||
print('테이블 목록:', [t[0] for t in tables])
|
||||
|
||||
# 로그 개수
|
||||
count = conn.execute('SELECT COUNT(*) FROM paai_logs').fetchone()[0]
|
||||
print(f'PAAI 로그 수: {count}개')
|
||||
|
||||
# 최근 로그
|
||||
print('\n최근 로그 3개:')
|
||||
recent = conn.execute('SELECT id, created_at, patient_name, status FROM paai_logs ORDER BY id DESC LIMIT 3').fetchall()
|
||||
for r in recent:
|
||||
print(f' #{r[0]} | {r[1]} | {r[2]} | {r[3]}')
|
||||
|
||||
# 피드백 통계
|
||||
feedback = conn.execute('SELECT feedback_useful, COUNT(*) FROM paai_logs GROUP BY feedback_useful').fetchall()
|
||||
print('\n피드백 통계:')
|
||||
for f in feedback:
|
||||
label = '유용' if f[0] == 1 else ('아님' if f[0] == 0 else '미응답')
|
||||
print(f' {label}: {f[1]}건')
|
||||
|
||||
conn.close()
|
||||
Reference in New Issue
Block a user