This commit is contained in:
2025-10-23 19:17:27 +08:00
parent 050809c471
commit 0acfb80849
9 changed files with 320 additions and 29 deletions

View File

@@ -0,0 +1,29 @@
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)
}
}
}

View File

@@ -1,4 +1,6 @@
// Code generated by goctl. DO NOT EDIT.
// goctl 1.8.4
package handler
import (
@@ -310,6 +312,12 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/refund/:id",
Handler: admin_order.AdminRefundOrderHandler(serverCtx),
},
{
// 重新执行代理处理
Method: http.MethodPost,
Path: "/retry-agent-process/:id",
Handler: admin_order.AdminRetryAgentProcessHandler(serverCtx),
},
{
// 更新订单
Method: http.MethodPut,