52 lines
1.1 KiB
Go
52 lines
1.1 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.10.1
|
|
|
|
package handler
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
dispute "juwan-backend/app/dispute/api/internal/handler/dispute"
|
|
"juwan-backend/app/dispute/api/internal/svc"
|
|
|
|
"github.com/zeromicro/go-zero/rest"
|
|
)
|
|
|
|
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|
server.AddRoutes(
|
|
[]rest.Route{
|
|
{
|
|
// 获取争议列表
|
|
Method: http.MethodGet,
|
|
Path: "/disputes",
|
|
Handler: dispute.ListDisputesHandler(serverCtx),
|
|
},
|
|
{
|
|
// 申诉
|
|
Method: http.MethodPost,
|
|
Path: "/disputes/:id/appeal",
|
|
Handler: dispute.AppealDisputeHandler(serverCtx),
|
|
},
|
|
{
|
|
// 回应争议
|
|
Method: http.MethodPost,
|
|
Path: "/disputes/:id/response",
|
|
Handler: dispute.RespondDisputeHandler(serverCtx),
|
|
},
|
|
{
|
|
// 获取订单争议
|
|
Method: http.MethodGet,
|
|
Path: "/orders/:id/dispute",
|
|
Handler: dispute.GetOrderDisputeHandler(serverCtx),
|
|
},
|
|
{
|
|
// 发起争议
|
|
Method: http.MethodPost,
|
|
Path: "/orders/:id/dispute",
|
|
Handler: dispute.CreateDisputeHandler(serverCtx),
|
|
},
|
|
},
|
|
rest.WithPrefix("/api/v1"),
|
|
)
|
|
}
|