You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
784 B
41 lines
784 B
package order
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"recook/internal/v2/lib/back"
|
|
"recook/internal/v2/logic/manage/order"
|
|
"recook/tools"
|
|
)
|
|
|
|
type Express struct {
|
|
}
|
|
|
|
type argsQuery struct {
|
|
OrderGoodsId uint `json:"orderGoodsId" form:"orderGoodsId"`
|
|
}
|
|
|
|
// @Style 查询快递信息
|
|
func (e *Express) Query(c *gin.Context) {
|
|
var args argsQuery
|
|
err := tools.Params(&args, c)
|
|
if err != nil {
|
|
back.Fail(c, err.Error())
|
|
return
|
|
}
|
|
if args.OrderGoodsId == 0 {
|
|
back.Fail(c, "参数错误")
|
|
return
|
|
}
|
|
result, err := order.Expresslogic.Query(args.OrderGoodsId)
|
|
if err != nil {
|
|
back.Fail(c, err.Error())
|
|
return
|
|
}
|
|
back.Suc(c, "", result)
|
|
}
|
|
|
|
// @Style 快递公司筛选
|
|
func (e *Express) Select(c *gin.Context) {
|
|
back.Suc(c, "操作成功", order.Expresslogic.Select())
|
|
}
|