feat: 临时不可调度规则支持按时间点重置#2848
Conversation
|
All contributors have signed the CLA. ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
Add a new 'reset_at_time' field to temp unschedulable rules, allowing accounts to be automatically恢复 at a specific time of day (e.g., 00:00 for daily reset) instead of using a fixed duration. Changes: - Backend: Add ResetAtTime field to TempUnschedulableRule struct - Backend: Update triggerTempUnschedulable to support time-based reset - Frontend: Add time picker with quick-fill button for daily reset - i18n: Add translations for the new field
425bad9 to
20fa21a
Compare
|
recheck |
|
- 后端增加严格的时间格式校验和服务器时区计算 - 前端抽取规则构建函数,添加前端校验和国际化文案 - 修复无效时间回退到duration_minutes的逻辑 - 在创建/更新账号时对credentials进行前置校验 - 新增单元测试覆盖验证、计算和回退场景
功能说明
为临时不可调度规则新增
reset_at_time字段,支持按指定时间点(如每天 00:00)自动恢复账号调度,而非固定时长冷却。改动内容
后端
TempUnschedulableRule结构体新增ResetAtTime字段(格式:HH:MM)triggerTempUnschedulable支持按时间点计算恢复时间reset_at_time,则计算到下一个该时间点的时间作为解除时间duration_minutes和reset_at_time至少填一个前端
使用方式
00:00表示每天凌晨 0 点重置两者都填时,优先使用
reset_at_time。