订单简单查询测试
This commit is contained in:
@@ -962,3 +962,27 @@ func RefreshOrdersPriceInfo(ctx *jxcontext.Context, fromTime, toTime time.Time,
|
||||
}
|
||||
return hint, err
|
||||
}
|
||||
|
||||
type GetOrderSimpleInfoResult struct {
|
||||
VendorOrderID string `orm:"column(vendor_order_id)" json:"vendorOrderID"`
|
||||
Status int `json:"status"`
|
||||
WaybillVendorID int `orm:"column(waybill_vendor_id)" json:"waybillVendorID"`
|
||||
CourierName string `json:"courierName"`
|
||||
CourierMobile string `json:"courierMobile"`
|
||||
Tel1 string `json:"tel1"`
|
||||
MarketManPhone string `json:"marketManPhone"`
|
||||
}
|
||||
|
||||
func GetOrderSimpleInfo(ctx *jxcontext.Context, vendorOrderID string) (getOrderSimpleInfoResult *GetOrderSimpleInfoResult, err error) {
|
||||
db := dao.GetDB()
|
||||
sql := `
|
||||
SELECT a.vendor_order_id, a.status, b.waybill_vendor_id, b.courier_name, b.courier_mobile, b.tel1, b.market_man_phone
|
||||
FROM goods_order a
|
||||
JOIN store b ON IF(a.store_id <> '', a.store_id, a.jx_store_id) = b.id
|
||||
LEFT JOIN waybill c ON c.vendor_order_id = a.vendor_order_id
|
||||
WHERE a.vendor_order_id = ?
|
||||
`
|
||||
sqlParams := []interface{}{vendorOrderID}
|
||||
err = dao.GetRow(db, &getOrderSimpleInfoResult, sql, sqlParams)
|
||||
return getOrderSimpleInfoResult, err
|
||||
}
|
||||
|
||||
@@ -1031,3 +1031,17 @@ func (c *OrderController) RefreshJdShopOrdersEarningPrice() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 根据订单号查询一些信息
|
||||
// @Description 根据订单号查询一些信息
|
||||
// @Param token header string false "认证token"
|
||||
// @Param vendorOrderID query string true "订单号"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetOrderSimpleInfo [get]
|
||||
func (c *OrderController) GetOrderSimpleInfo() {
|
||||
c.callGetOrderSimpleInfo(func(params *tOrderGetOrderSimpleInfoParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = orderman.GetOrderSimpleInfo(params.Ctx, params.VendorOrderID)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1017,6 +1017,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"],
|
||||
beego.ControllerComments{
|
||||
Method: "GetOrderSimpleInfo",
|
||||
Router: `/GetOrderSimpleInfo`,
|
||||
AllowHTTPMethods: []string{"get"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"],
|
||||
beego.ControllerComments{
|
||||
Method: "GetOrderSkuInfo",
|
||||
|
||||
Reference in New Issue
Block a user