12345678910111213141516171819202122232425262728 |
- package handler
- import (
- "net/http"
- "github.com/zeromicro/go-zero/rest/httpx"
- "jygit.jydev.jianyu360.cn/ApplicationCenter/publicService/api/internal/logic"
- "jygit.jydev.jianyu360.cn/ApplicationCenter/publicService/api/internal/svc"
- "jygit.jydev.jianyu360.cn/ApplicationCenter/publicService/api/internal/types"
- )
- func DatasmtListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
- return func(w http.ResponseWriter, r *http.Request) {
- var req types.DatasmtReqList
- if err := httpx.Parse(r, &req); err != nil {
- httpx.ErrorCtx(r.Context(), w, err)
- return
- }
- l := logic.NewDatasmtListLogic(r.Context(), svcCtx)
- resp, err := l.DatasmtList(&req)
- if err != nil {
- httpx.ErrorCtx(r.Context(), w, err)
- } else {
- httpx.OkJsonCtx(r.Context(), w, resp)
- }
- }
- }
|