|
@@ -0,0 +1,28 @@
|
|
|
+package handler
|
|
|
+
|
|
|
+import (
|
|
|
+ "net/http"
|
|
|
+
|
|
|
+ "bp.jydev.jianyu360.cn/CRM/application/api/internal/logic"
|
|
|
+ "bp.jydev.jianyu360.cn/CRM/application/api/internal/svc"
|
|
|
+ "bp.jydev.jianyu360.cn/CRM/application/api/internal/types"
|
|
|
+ "github.com/zeromicro/go-zero/rest/httpx"
|
|
|
+)
|
|
|
+
|
|
|
+func plistPathHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|
|
+ return func(w http.ResponseWriter, r *http.Request) {
|
|
|
+ var req types.PListPathReq
|
|
|
+ if err := httpx.Parse(r, &req); err != nil {
|
|
|
+ httpx.ErrorCtx(r.Context(), w, err)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ l := logic.NewPlistPathLogic(r.Context(), svcCtx)
|
|
|
+ resp, err := l.PlistPath(&req)
|
|
|
+ if err != nil {
|
|
|
+ httpx.ErrorCtx(r.Context(), w, err)
|
|
|
+ } else {
|
|
|
+ httpx.OkJsonCtx(r.Context(), w, resp)
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|