BuyerCancelOrder
This commit is contained in:
@@ -160,7 +160,7 @@ func CreateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64,
|
||||
}
|
||||
|
||||
// 买家取消(或申请取消)订单
|
||||
func BuyerCancelOrder(ctx *jxcontext.Context, orderID int64) (canceled bool, err error) {
|
||||
func BuyerCancelOrder(ctx *jxcontext.Context, orderID int64, reason string) (canceled bool, err error) {
|
||||
order, err := partner.CurOrderManager.LoadOrder(utils.Int64ToStr(orderID), model.VendorIDJX)
|
||||
if err == nil {
|
||||
if order.Status < model.OrderStatusNew {
|
||||
|
||||
@@ -46,6 +46,21 @@ func (c *JxOrderController) Pay4Order() {
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 买家取消(或申请取消)订单
|
||||
// @Description 买家取消(或申请取消)订单
|
||||
// @Param token header string true "认证token"
|
||||
// @Param vendorOrderID formData string true "订单ID"
|
||||
// @Param reason formData string true "原因"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /BuyerCancelOrder [post]
|
||||
func (c *JxOrderController) BuyerCancelOrder() {
|
||||
c.callBuyerCancelOrder(func(params *tJxorderBuyerCancelOrderParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = localjx.BuyerCancelOrder(params.Ctx, utils.Str2Int64(params.VendorOrderID), params.Reason)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 查询网络打印机状态
|
||||
// @Description 查询网络打印机状态
|
||||
// @Param token header string true "认证token"
|
||||
|
||||
Reference in New Issue
Block a user