Some checks failed
Build docker and publish / build (20.15.1) (push) Has been cancelled
refactor: 重构用户模型和密码验证逻辑 feat(epay): 添加支付类型支持 docs: 添加安装和配置指南文档 fix: 修复优惠券过期检查逻辑 perf: 优化设备解绑缓存清理流程 test: 添加密码验证测试用例 chore: 更新依赖版本
47 lines
1.8 KiB
Go
47 lines
1.8 KiB
Go
package handler
|
|
|
|
import (
|
|
"github.com/hibiken/asynq"
|
|
"github.com/perfect-panel/server/internal/svc"
|
|
orderLogic "github.com/perfect-panel/server/queue/logic/order"
|
|
smslogic "github.com/perfect-panel/server/queue/logic/sms"
|
|
"github.com/perfect-panel/server/queue/logic/subscription"
|
|
"github.com/perfect-panel/server/queue/logic/task"
|
|
"github.com/perfect-panel/server/queue/logic/traffic"
|
|
"github.com/perfect-panel/server/queue/types"
|
|
|
|
emailLogic "github.com/perfect-panel/server/queue/logic/email"
|
|
)
|
|
|
|
func RegisterHandlers(mux *asynq.ServeMux, serverCtx *svc.ServiceContext) {
|
|
// Send email task
|
|
mux.Handle(types.ForthwithSendEmail, emailLogic.NewSendEmailLogic(serverCtx))
|
|
// Send sms task
|
|
mux.Handle(types.ForthwithSendSms, smslogic.NewSendSmsLogic(serverCtx))
|
|
// Defer close order task
|
|
mux.Handle(types.DeferCloseOrder, orderLogic.NewDeferCloseOrderLogic(serverCtx))
|
|
// Forthwith activate order task
|
|
mux.Handle(types.ForthwithActivateOrder, orderLogic.NewActivateOrderLogic(serverCtx))
|
|
|
|
// Forthwith traffic statistics
|
|
mux.Handle(types.ForthwithTrafficStatistics, traffic.NewTrafficStatisticsLogic(serverCtx))
|
|
|
|
// Schedule check subscription
|
|
mux.Handle(types.SchedulerCheckSubscription, subscription.NewCheckSubscriptionLogic(serverCtx))
|
|
|
|
// Schedule total server data
|
|
mux.Handle(types.SchedulerTotalServerData, traffic.NewServerDataLogic(serverCtx))
|
|
|
|
// Schedule reset traffic
|
|
mux.Handle(types.SchedulerResetTraffic, traffic.NewResetTrafficLogic(serverCtx))
|
|
|
|
// ScheduledBatchSendEmail
|
|
mux.Handle(types.ScheduledBatchSendEmail, emailLogic.NewBatchEmailLogic(serverCtx))
|
|
|
|
// ScheduledTrafficStat
|
|
mux.Handle(types.SchedulerTrafficStat, traffic.NewStatLogic(serverCtx))
|
|
|
|
// ForthwithQuotaTask
|
|
mux.Handle(types.ForthwithQuotaTask, task.NewQuotaTaskLogic(serverCtx))
|
|
}
|