feat(ECR-040): ExploreConfig ScaleDefinition 只读投影并 Closed

复用 scales 表只读投影;admin-h5 /catalogs 聚合 026–040 目录;Loop 队列 STOP。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-08 03:20:42 +08:00
co-authored by Cursor
parent 432c090046
commit e9c11cdf1d
26 changed files with 463 additions and 2 deletions
@@ -42,6 +42,18 @@ func (s *Service) ListScalesAdmin(ctx context.Context) ([]repository.ScaleAdminI
return s.Scales.ListAllAdmin(ctx)
}
// GetScaleAdmin loads one scale for explore read projection.
func (s *Service) GetScaleAdmin(ctx context.Context, id uuid.UUID) (*repository.ScaleAdminItem, error) {
if s.Scales == nil {
return nil, errors.New("scales unavailable")
}
row, err := s.Scales.GetAdmin(ctx, id)
if errors.Is(err, pgx.ErrNoRows) {
return nil, ErrScaleNotFound
}
return row, err
}
// PatchScaleStatus updates published|draft and audits in one transaction.
func (s *Service) PatchScaleStatus(ctx context.Context, adminID, scaleID uuid.UUID, status string) error {
if status != "published" && status != "draft" {