浏览代码

fix vouchers vanishing on expiry date

Pi 3 周之前
父节点
当前提交
aa39503119
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      util-sqlpage/code/recent.sql

+ 1 - 1
util-sqlpage/code/recent.sql

@@ -34,7 +34,7 @@ FROM code c
 LEFT JOIN code_detail cd
 ON c.hash = cd.hash
 WHERE (
-    cd.expiry IS NULL OR COALESCE($expired, 'false') = 'true' OR date(cd.expiry) > date(datetime(CURRENT_TIMESTAMP, 'localtime'))
+    cd.expiry IS NULL OR COALESCE($expired, 'false') = 'true' OR date(cd.expiry) >= date(datetime(CURRENT_TIMESTAMP, 'localtime'))
 ) AND (
     cd.used IS NULL OR COALESCE($used||'', 'false') = 'true' OR COALESCE(cd.used||'','') = 'false'
 ) AND (