Files
hm-server-v2/app/main/api/internal/handler/admin_order/adminretryagentprocesshandler.go
2025-10-23 19:17:27 +08:00

30 lines
765 B
Go

package admin_order
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"hm-server/app/main/api/internal/logic/admin_order"
"hm-server/app/main/api/internal/svc"
"hm-server/app/main/api/internal/types"
)
// 重新执行代理处理
func AdminRetryAgentProcessHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.AdminRetryAgentProcessReq
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
l := admin_order.NewAdminRetryAgentProcessLogic(r.Context(), svcCtx)
resp, err := l.AdminRetryAgentProcess(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}