fix(creator): 权限开通后的状态显示 + 同步范围可选可查
- 权限显示:实测今天 display/status 已变成 1,但 tip 是「数据正在更新中,请耐心等待」, 作品仍是 0 条。原逻辑只在未开通时显示提示条,于是会一边写着「数据已开通」一边列不出 作品,自相矛盾。现在只要后台有话要说就显示,并按状态区分措辞。 - 同步范围:原本写死 90 天,界面上既看不见也改不了。现在可选 7/30/90/180/365/730 天, 与后端校验上限一致。 - 新增 creator_account.last_sync_days,记录上次实际使用的范围 —— 否则界面只能说 「同步过了」,说不清覆盖的是哪一段。选择器也会对齐到它,避免上次同步 1 年、这次 点一下悄悄缩回 90 天。
This commit is contained in:
@@ -73,6 +73,9 @@ class CreatorAccount(MonitorBase):
|
||||
|
||||
last_checked_at: Mapped[Optional[int]] = mapped_column(BigInteger)
|
||||
last_synced_at: Mapped[Optional[int]] = mapped_column(BigInteger)
|
||||
# 上次同步用的时间范围(天,按发布时间)。当前展示的数据就是这个范围的产物 ——
|
||||
# 不记下来的话,界面只能说明"同步过了",说不清是哪一段。
|
||||
last_sync_days: Mapped[int] = mapped_column(Integer, nullable=False, default=0)
|
||||
last_error: Mapped[Optional[str]] = mapped_column(Text)
|
||||
|
||||
created_at: Mapped[int] = mapped_column(BigInteger, nullable=False)
|
||||
|
||||
Reference in New Issue
Block a user