feat(M4): 生命周期 + 审计 — 到期锁定/回收 cron、审计查询/CSV 导出/每日归档、settings 动态策略

This commit is contained in:
2026-08-30 10:17:22 +08:00
parent 1ea18490e0
commit c0e2ff975a
18 changed files with 1088 additions and 75 deletions
+2 -2
View File
@@ -182,7 +182,7 @@ func TestUserServiceLifecycle(t *testing.T) {
}
// 延期
if err := svc.Extend(ctx, u.ID, 30); err != nil {
if _, err := svc.Extend(ctx, u.ID, 30); err != nil {
t.Fatalf("extend: %v", err)
}
@@ -219,7 +219,7 @@ func TestUserServiceEnableExpired(t *testing.T) {
t.Fatalf("enable expired err = %v, want ErrUserExpired", err)
}
// 延期可恢复
if err := svc.Extend(ctx, u.ID, 30); err != nil {
if _, err := svc.Extend(ctx, u.ID, 30); err != nil {
t.Fatalf("extend expired: %v", err)
}
if u2, _ := svc.GetByID(ctx, u.ID); u2.Status != model.UserStatusActive {