order_router.go
895 字节
package routers
import (
"github.com/beego/beego/v2/server/web"
"gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/port/beego/controllers"
)
func init() {
web.Router("/orders/", &controllers.OrderController{}, "Post:CreateOrder")
web.Router("/orders/:orderId", &controllers.OrderController{}, "Put:UpdateOrder")
web.Router("/orders/:orderId", &controllers.OrderController{}, "Get:GetOrder")
web.Router("/orders/:orderId", &controllers.OrderController{}, "Delete:RemoveOrder")
web.Router("/orders/", &controllers.OrderController{}, "Get:ListOrder")
web.Router("/orders/shipping", &controllers.OrderController{}, "Post:Shipping")
web.Router("/orders/receiveGoods", &controllers.OrderController{}, "Post:ReceiveGoods")
web.Router("/orders/returnGoods", &controllers.OrderController{}, "Post:ReturnGoods")
web.Router("/orders/cancel", &controllers.OrderController{}, "Post:CancelOrder")
}