package manager import ( "net/http" "chainweaver.org.cn/chainweaver/did/did-mgr-common-service/internal/logic/manager" "chainweaver.org.cn/chainweaver/did/did-mgr-common-service/internal/svc" "chainweaver.org.cn/chainweaver/did/did-mgr-common-service/internal/types" "github.com/zeromicro/go-zero/rest/httpx" ) func NotificationQueryHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req types.PageReq if err := httpx.Parse(r, &req); err != nil { httpx.ErrorCtx(r.Context(), w, err) return } l := manager.NewNotificationQueryLogic(r.Context(), svcCtx) resp, err := l.NotificationQuery(&req) if err != nil { httpx.ErrorCtx(r.Context(), w, err) } else { httpx.OkJsonCtx(r.Context(), w, resp) } } }