From 6f0d27e54d58d022ab9ce9c9cbab7251a033e5bf Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 20 Jul 2018 20:36:34 +0800 Subject: [PATCH] - fix weixin bug. --- business/jxutils/weixinmsg/weixinmsg.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/business/jxutils/weixinmsg/weixinmsg.go b/business/jxutils/weixinmsg/weixinmsg.go index 7258d3a85..be9be5575 100644 --- a/business/jxutils/weixinmsg/weixinmsg.go +++ b/business/jxutils/weixinmsg/weixinmsg.go @@ -52,15 +52,15 @@ func GetWeixinOpenIDsFromStoreID(storeID int) (retVal []string) { WHERE jxstoreid = ? AND parentid = -1 AND openid IS NOT NULL `, storeID, storeID).ValuesList(&lists) if err != nil || num == 0 { - globals.SugarLogger.Infof("can not find openid for store:%d, num:%, error:%v", storeID, num, err) + globals.SugarLogger.Infof("can not find openid for store:%d, num:%d, error:%v", storeID, num, err) return retVal } for _, v := range lists { retVal = append(retVal, v[0].(string)) } // todo,调试,只发给我 - globals.SugarLogger.Debugf("store:%d, openids:%v", storeID, retVal) - if storeID == 100146 { + globals.SugarLogger.Debugf("GetWeixinOpenIDsFromStoreID store:%d, openids:%v", storeID, retVal) + if storeID%3 == 0 { //} storeID == 100146 { retVal = []string{"oYN_ust9hXKEvEv0X6Mq6nlAWs_E"} } else { retVal = []string{} @@ -124,7 +124,7 @@ func NotifyNewOrder(order *model.GoodsOrder) (err error) { }, } storeID := jxutils.GetJxStoreIDFromOrder(order) - return SendMsgToStore(storeID, fmt.Sprintf("%s%d", WX_TO_ORDER_PAGE_URL, storeID), WX_NEWORDER_TEMPLATE_ID, data) + return SendMsgToStore(storeID, WX_NEWORDER_TEMPLATE_ID, fmt.Sprintf("%s%d", WX_TO_ORDER_PAGE_URL, storeID), data) } func NotifyWaybillStatus(bill *model.Waybill, order *model.GoodsOrder) error { @@ -172,8 +172,6 @@ func NotifyWaybillStatus(bill *model.Waybill, order *model.GoodsOrder) error { }, } return SendMsgToStore(jxutils.GetJxStoreIDFromOrder(order), templateID, "", data) - } else { - globals.SugarLogger.Infof("NotifyWaybillStatus wrong, bill:%v", bill) } return nil }