feat: 添加通知微服务,支持站内通知已读状态
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package svc
|
||||
|
||||
import (
|
||||
"juwan-backend/app/notification/api/internal/config"
|
||||
"juwan-backend/app/notification/rpc/notificationservice"
|
||||
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
NotificationRpc notificationservice.NotificationService
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
NotificationRpc: notificationservice.NewNotificationService(zrpc.MustNewClient(c.NotificationRpcConf)),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user