- don't send weixin msg when ebai order

- don't return ebai orders in GetStoreOrderInfo and GetStoreOrderCountInfo
This commit is contained in:
gazebo
2018-11-16 15:48:20 +08:00
parent 1ff2463768
commit 2a82fc6975
2 changed files with 10 additions and 2 deletions

View File

@@ -48,7 +48,7 @@ func (c *OrderManager) GetStoreOrderInfo(ctx *jxcontext.Context, storeID string,
t2.actual_fee, t2.desired_fee, t2.waybill_created_at, t2.waybill_finished_at
FROM goods_order t1
LEFT JOIN waybill t2 ON t1.vendor_waybill_id = t2.vendor_waybill_id AND t1.waybill_vendor_id = t2.waybill_vendor_id
WHERE IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) = ?
WHERE t1.vendor_id <> 3 AND IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) = ?
AND t1.order_created_at >= ?
AND t1.Status >= ? AND t1.Status <= ?
ORDER BY t1.status, t1.order_created_at
@@ -73,7 +73,7 @@ func (c *OrderManager) GetStoreOrderCountInfo(ctx *jxcontext.Context, storeID st
_, err = db.Raw(`
SELECT t1.status, COUNT(*) count
FROM goods_order t1
WHERE IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) = ?
WHERE t1.vendor_id <> 3 AND IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) = ?
AND t1.order_created_at >= ?
GROUP BY 1
ORDER BY 1

View File

@@ -113,6 +113,10 @@ func SendMsgToStore(storeID int, templateID, downloadURL string, data interface{
func NotifyNewOrder(order *model.GoodsOrder) (err error) {
globals.SugarLogger.Debugf("NotifyNewOrder orderID:%s", order.VendorOrderID)
if order.VendorID == model.VendorIDEBAI {
return nil
}
if !model.IsOrderSolid(order) {
globals.SugarLogger.Infof("NotifyNewOrder orderID:%s is not solid", order.VendorOrderID)
return nil
@@ -161,6 +165,10 @@ func NotifyNewOrder(order *model.GoodsOrder) (err error) {
func NotifyWaybillStatus(bill *model.Waybill, order *model.GoodsOrder) error {
globals.SugarLogger.Debugf("NotifyWaybillStatus orderID:%s bill:%v", order.VendorOrderID, bill)
if order.VendorID == model.VendorIDEBAI {
return nil
}
if !model.IsOrderSolid(order) {
globals.SugarLogger.Infof("NotifyWaybillStatus orderID:%s is not solid", order.VendorOrderID)
return nil