1、微信回调签名验证绕过问题
2、联系请求竞态条件问题
3、contact列表count过滤bug
4、核心业务表索引添加
This commit is contained in:
2026-06-29 10:15:10 +08:00
parent b21f35582e
commit 92fb64aa99
9 changed files with 243 additions and 72 deletions
+9 -2
View File
@@ -1,4 +1,4 @@
from sqlalchemy import Boolean, ForeignKey, String, Text
from sqlalchemy import Boolean, ForeignKey, String, Text, UniqueConstraint, Index
from sqlalchemy.orm import Mapped, mapped_column
from app.models.base import Base, TimestampMixin
@@ -14,4 +14,11 @@ class ContactRequest(Base, TimestampMixin):
industry: Mapped[str] = mapped_column(String(64))
name: Mapped[str] = mapped_column(String(64))
message: Mapped[str | None] = mapped_column(Text, nullable=True)
is_handled: Mapped[bool] = mapped_column(Boolean, default=False)
is_handled: Mapped[bool] = mapped_column(Boolean, default=False)
submit_date: Mapped[str] = mapped_column(String(10), index=True)
__table_args__ = (
UniqueConstraint('user_id', 'submit_date', name='uq_contact_user_date'),
Index('idx_contact_handled_created', 'is_handled', 'created_at'),
Index('idx_contact_user_date_created', 'user_id', 'submit_date', 'created_at'),
)