发布(0.4.6): 修复预售兑换记录判定与详情展示并新增工作台强制发放

This commit is contained in:
yml
2026-11-27 14:50:45 +08:00
parent 5006367217
commit e25e35994d
22 changed files with 1118 additions and 38 deletions
+8 -1
View File
@@ -49,7 +49,14 @@ def _resolve_gift(
if cid:
row = query.filter(DouyuGoodsSnapshot.commodity_id == cid).first()
if row is None and name:
row = query.filter(DouyuGoodsSnapshot.name == name).first()
row = (
query.filter(DouyuGoodsSnapshot.name == name)
.order_by(
DouyuGoodsSnapshot.updated_at.desc(),
DouyuGoodsSnapshot.id.desc(),
)
.first()
)
if row is not None:
if not name:
name = _text(row.name, max_length=128)