- 将美团外卖售中,商户同意取消订单消息当成订单取消消息
This commit is contained in:
@@ -621,7 +621,7 @@ func (c *OrderManager) GetOrdersFinancial(ctx *jxcontext.Context, fromDateStr, t
|
|||||||
|
|
||||||
func (c *OrderManager) GetStoresOrderSaleInfo(ctx *jxcontext.Context, storeIDList []int, fromTime time.Time, toTime time.Time, statusList []int) (saleInfoList []*StoresOrderSaleInfo, err error) {
|
func (c *OrderManager) GetStoresOrderSaleInfo(ctx *jxcontext.Context, storeIDList []int, fromTime time.Time, toTime time.Time, statusList []int) (saleInfoList []*StoresOrderSaleInfo, err error) {
|
||||||
if toTime.Sub(fromTime) > time.Hour*24*60 {
|
if toTime.Sub(fromTime) > time.Hour*24*60 {
|
||||||
return nil, fmt.Errorf("查询时间范围不能超过2个月")
|
return nil, fmt.Errorf("查询时间范围不能超过60天")
|
||||||
}
|
}
|
||||||
sql := `
|
sql := `
|
||||||
SELECT IF(t1.jx_store_id > 0, t1.jx_store_id, t1.store_id) store_id, t1.vendor_id, IF(t1.status < ?, 0, t1.status) status,
|
SELECT IF(t1.jx_store_id > 0, t1.jx_store_id, t1.store_id) store_id, t1.vendor_id, IF(t1.status < ?, 0, t1.status) status,
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ const (
|
|||||||
FakeMsgTypeOrderDelivering = "orderDelivering"
|
FakeMsgTypeOrderDelivering = "orderDelivering"
|
||||||
|
|
||||||
fakeUserApplyCancel = "fake_user_apply_cancel"
|
fakeUserApplyCancel = "fake_user_apply_cancel"
|
||||||
|
fakeMerchantAgreeApplyCancel = "fake_merchant_agree_apply_cancel"
|
||||||
fakeRefuseUserApplyCancel = "fake_refuse_user_apply_cancel"
|
fakeRefuseUserApplyCancel = "fake_refuse_user_apply_cancel"
|
||||||
fakeUserUndoApplyCancel = "fake_user_undo_apply_cancel"
|
fakeUserUndoApplyCancel = "fake_user_undo_apply_cancel"
|
||||||
fakeOrderAdjustFinished = "fake_order_adjust_finished"
|
fakeOrderAdjustFinished = "fake_order_adjust_finished"
|
||||||
@@ -53,6 +54,7 @@ var (
|
|||||||
fakeRefuseUserApplyCancel: model.OrderStatusUnlocked,
|
fakeRefuseUserApplyCancel: model.OrderStatusUnlocked,
|
||||||
fakeUserApplyCancel: model.OrderStatusApplyCancel,
|
fakeUserApplyCancel: model.OrderStatusApplyCancel,
|
||||||
fakeUserUndoApplyCancel: model.OrderStatusUndoApplyCancel,
|
fakeUserUndoApplyCancel: model.OrderStatusUndoApplyCancel,
|
||||||
|
fakeMerchantAgreeApplyCancel: model.OrderStatusCanceled,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -239,6 +241,8 @@ func (c *PurchaseHandler) callbackMsg2Status(msg *mtwmapi.CallbackMsg) (orderSta
|
|||||||
vendorStatus = fakeUserUndoApplyCancel
|
vendorStatus = fakeUserUndoApplyCancel
|
||||||
} else if notifyType == mtwmapi.NotifyTypeReject {
|
} else if notifyType == mtwmapi.NotifyTypeReject {
|
||||||
vendorStatus = fakeRefuseUserApplyCancel
|
vendorStatus = fakeRefuseUserApplyCancel
|
||||||
|
} else if notifyType == mtwmapi.NotifyTypeSuccess {
|
||||||
|
vendorStatus = fakeMerchantAgreeApplyCancel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user