- use auto router for callback msg.
- first normal demo api FinishedPickup added.
This commit is contained in:
28
controllers/jx_order.go
Normal file
28
controllers/jx_order.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
|
||||
type OrderController struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
func (c *OrderController) URLMapping() {
|
||||
c.Mapping("FinishedPickup", c.FinishedPickup)
|
||||
}
|
||||
|
||||
// @Title 完成拣货
|
||||
// @Description 完成拣货,如果是购物平台负责配送,则自动召唤相应配送
|
||||
// @Param orderid path string true "订单ID"
|
||||
// @Success 200 {object} business.model.CallResult
|
||||
// @Failure 200 {object} business.model.CallResult
|
||||
// @router /finishedpickup/:orderid [post]
|
||||
func (c *OrderController) FinishedPickup() {
|
||||
c.Data["json"] = &model.CallResult{
|
||||
Code: 0,
|
||||
Result: c.Ctx.Input.Param(":orderid"),
|
||||
}
|
||||
c.ServeJSON()
|
||||
}
|
||||
Reference in New Issue
Block a user