feat(report): integrate report handling into application
- Added Report and AdminReport handlers to manage report-related functionalities. - Updated router and wire generation to include new report services and handlers. - Enhanced error handling in report and admin report handlers to return appropriate status codes. - Refactored notification logic in admin report service to utilize a dedicated notification repository and push service.
This commit is contained in:
@@ -404,12 +404,13 @@ func ProvideReportService(
|
||||
commentRepo repository.CommentRepository,
|
||||
messageRepo repository.MessageRepository,
|
||||
userRepo repository.UserRepository,
|
||||
systemNotify service.SystemNotificationService,
|
||||
notifyRepo repository.SystemNotificationRepository,
|
||||
pushService service.PushService,
|
||||
txManager repository.TransactionManager,
|
||||
logService *service.LogService,
|
||||
logService service.OperationLogService,
|
||||
cfg *config.Config,
|
||||
) service.ReportService {
|
||||
return service.NewReportService(reportRepo, postRepo, commentRepo, messageRepo, userRepo, systemNotify, txManager, logService, cfg)
|
||||
return service.NewReportService(reportRepo, postRepo, commentRepo, messageRepo, userRepo, notifyRepo, pushService, txManager, logService, cfg)
|
||||
}
|
||||
|
||||
// ProvideAdminReportService 提供管理端举报服务
|
||||
@@ -419,9 +420,10 @@ func ProvideAdminReportService(
|
||||
commentRepo repository.CommentRepository,
|
||||
messageRepo repository.MessageRepository,
|
||||
userRepo repository.UserRepository,
|
||||
systemNotify service.SystemNotificationService,
|
||||
notifyRepo repository.SystemNotificationRepository,
|
||||
pushService service.PushService,
|
||||
txManager repository.TransactionManager,
|
||||
logService *service.LogService,
|
||||
logService service.OperationLogService,
|
||||
) service.AdminReportService {
|
||||
return service.NewAdminReportService(reportRepo, postRepo, commentRepo, messageRepo, userRepo, systemNotify, txManager, logService)
|
||||
return service.NewAdminReportService(reportRepo, postRepo, commentRepo, messageRepo, userRepo, notifyRepo, pushService, txManager, logService)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user