(req dto.AlertConfigPageReq)
| 495 | } |
| 496 | |
| 497 | func (a AlertService) PageAlertConfig(req dto.AlertConfigPageReq) (int64, []model.AlertConfig, error) { |
| 498 | opts := []repo.DBOption{ |
| 499 | alertRepo.WithByTypeNotIn([]string{"common"}), |
| 500 | repo.WithOrderDesc("created_at"), |
| 501 | } |
| 502 | if len(req.ExcludeTypes) > 0 { |
| 503 | opts = append(opts, alertRepo.WithByTypeNotIn(req.ExcludeTypes)) |
| 504 | } |
| 505 | return alertRepo.PageAlertConfig(req.Page, req.PageSize, opts...) |
| 506 | } |
| 507 | |
| 508 | func (a AlertService) UpdateAlertConfig(req dto.AlertConfigUpdate, operator string) error { |
| 509 | if err := a.validateCommunityAlertConfigType(req.Type); err != nil { |
nothing calls this directly
no test coverage detected