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 -4
View File
@@ -1,4 +1,4 @@
from sqlalchemy import Integer, String, Text
from sqlalchemy import Integer, String, Text, Index
from sqlalchemy.orm import Mapped, mapped_column
from app.models.base import Base, TimestampMixin
@@ -10,8 +10,13 @@ class OperationLog(Base, TimestampMixin):
id: Mapped[str] = mapped_column(String(32), primary_key=True)
user_id: Mapped[str] = mapped_column(String(32), index=True)
username: Mapped[str] = mapped_column(String(64))
action: Mapped[str] = mapped_column(String(128)) # e.g. "创建用户", "修改菜单"
method: Mapped[str] = mapped_column(String(10)) # POST/PUT/DELETE
action: Mapped[str] = mapped_column(String(128))
method: Mapped[str] = mapped_column(String(10))
path: Mapped[str] = mapped_column(String(256))
detail: Mapped[str | None] = mapped_column(Text, nullable=True) # JSON detail
detail: Mapped[str | None] = mapped_column(Text, nullable=True)
ip: Mapped[str | None] = mapped_column(String(64), nullable=True)
__table_args__ = (
Index('idx_oplog_user_created', 'user_id', 'created_at'),
Index('idx_oplog_created', 'created_at'),
)