package handler import ( "fusenapi/utils/basic" "net/http" "fusenapi/server/websocket/internal/logic" "fusenapi/server/websocket/internal/svc" "fusenapi/server/websocket/internal/types" ) func DataTransferHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req types.DataTransferReq _, err := basic.RequestParse(w, r, svcCtx, &req) if err != nil { return } // 创建一个业务逻辑层实例 l := logic.NewDataTransferLogic(r.Context(), svcCtx) l.DataTransfer(&req, w, r) } }