prmonitorlisthandler.go 786 B

1234567891011121314151617181920212223242526272829
  1. package handler
  2. import (
  3. "net/http"
  4. "bp.jydev.jianyu360.cn/CRM/networkManage/api/internal/logic"
  5. "bp.jydev.jianyu360.cn/CRM/networkManage/api/internal/svc"
  6. "bp.jydev.jianyu360.cn/CRM/networkManage/api/internal/types"
  7. "github.com/zeromicro/go-zero/rest/httpx"
  8. )
  9. // 公关渠道-业主监控项目找人脉
  10. func PrMonitorListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
  11. return func(w http.ResponseWriter, r *http.Request) {
  12. var req types.PrMonitorListReq
  13. if err := httpx.Parse(r, &req); err != nil {
  14. httpx.ErrorCtx(r.Context(), w, err)
  15. return
  16. }
  17. l := logic.NewPrMonitorListLogic(r.Context(), svcCtx)
  18. resp, err := l.PrMonitorList(&req)
  19. if err != nil {
  20. httpx.ErrorCtx(r.Context(), w, err)
  21. } else {
  22. httpx.OkJsonCtx(r.Context(), w, resp)
  23. }
  24. }
  25. }