add status

This commit is contained in:
董海洋
2026-06-04 11:53:21 +08:00
parent 1bf6e400c9
commit 89afdbec20
2 changed files with 34 additions and 1 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ async function getTodayStats(ctx) {
const stockThreshold = parseInt(process.env.STOCK_WARN_THRESHOLD) || 10
const lowStockResult = await query(
'SELECT COUNT(*) as lowStockCount FROM goods WHERE stock < ? AND status != 0',
'SELECT COUNT(*) as lowStockCount FROM goods WHERE stock < ? AND status = 1',
[stockThreshold]
)