fix
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user