1
This commit is contained in:
@@ -373,12 +373,6 @@ func setFakeOrderFlag(db *dao.DaoDB, order *model.GoodsOrder) {
|
||||
}
|
||||
|
||||
func (c *OrderManager) SaveOrder(order *model.GoodsOrder, isAdjust bool, db *dao.DaoDB) (isDuplicated bool, err error) {
|
||||
// 忽略美团超市的订单
|
||||
if order.VendorID == model.VendorIDMTWM {
|
||||
if order.VendorStoreID == "2391979" || order.VendorStoreID == "7379027" {
|
||||
return
|
||||
}
|
||||
}
|
||||
// 忽略查找JX信息错误
|
||||
c.updateOrderOtherInfo(order, db)
|
||||
order.ID = 0
|
||||
@@ -398,22 +392,20 @@ func (c *OrderManager) SaveOrder(order *model.GoodsOrder, isAdjust bool, db *dao
|
||||
}
|
||||
}()
|
||||
// todo hardcode 兼容京东消息错序问题
|
||||
if true { //order.VendorID == model.VendorIDJD {
|
||||
orderStatus := &model.OrderStatus{}
|
||||
if dao.GetRow(db, orderStatus, `
|
||||
orderStatus := &model.OrderStatus{}
|
||||
if dao.GetRow(db, orderStatus, `
|
||||
SELECT *
|
||||
FROM order_status
|
||||
WHERE order_type = ? AND vendor_order_id = ? AND vendor_id = ? AND status > 0
|
||||
ORDER BY status_time DESC
|
||||
LIMIT 1
|
||||
`, model.OrderTypeOrder, order.VendorOrderID, order.VendorID) == nil {
|
||||
if orderStatus.Status > order.Status {
|
||||
order.Status = orderStatus.Status
|
||||
order.VendorStatus = orderStatus.VendorStatus
|
||||
order.StatusTime = orderStatus.StatusTime
|
||||
if orderStatus.Status > order.Status {
|
||||
order.Status = orderStatus.Status
|
||||
order.VendorStatus = orderStatus.VendorStatus
|
||||
order.StatusTime = orderStatus.StatusTime
|
||||
|
||||
// jxutils.RefreshOrderSkuRelated(order)
|
||||
}
|
||||
// jxutils.RefreshOrderSkuRelated(order)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -357,9 +357,12 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
order.DiscountMoney = discountMoney
|
||||
order.Skus = append(order.Skus, giftSkus...)
|
||||
|
||||
// 包装袋金额设置
|
||||
store, _ := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID, order.VendorOrgCode)
|
||||
order.PackagePrice = store.PackageSetting
|
||||
// 包装袋金额+服务费
|
||||
store, _ := dao.GetStoreDetailByVendorStoreID(dao.GetDB(), order.VendorStoreID, model.VendorIDEBAI, order.VendorOrgCode)
|
||||
if store != nil {
|
||||
order.StoreName = store.Name // 真实门店名称
|
||||
order.PackagePrice = store.PackageSetting
|
||||
}
|
||||
jxutils.RefreshOrderSkuRelated(order)
|
||||
return order
|
||||
}
|
||||
|
||||
@@ -319,9 +319,13 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
}
|
||||
}
|
||||
|
||||
// 包装袋金额设置
|
||||
store, _ := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID, order.VendorOrgCode)
|
||||
order.PackagePrice = store.PackageSetting
|
||||
// 包装袋金额
|
||||
store, _ := dao.GetStoreDetailByVendorStoreID(dao.GetDB(), order.VendorStoreID, model.VendorIDTaoVegetable, order.VendorOrgCode)
|
||||
if store != nil {
|
||||
order.StoreName = store.Name // 真实门店名称
|
||||
order.PackagePrice = store.PackageSetting
|
||||
}
|
||||
|
||||
jxutils.RefreshOrderSkuRelated(order)
|
||||
return order
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user