From 6ec928611dad07fdff14cbf7b16f25f73b82cb94 Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 20 Jul 2018 18:21:10 +0800 Subject: [PATCH] - avoid openid is null. --- business/jxutils/weixinmsg/weixinmsg.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/business/jxutils/weixinmsg/weixinmsg.go b/business/jxutils/weixinmsg/weixinmsg.go index c6fab7413..7cc26ddae 100644 --- a/business/jxutils/weixinmsg/weixinmsg.go +++ b/business/jxutils/weixinmsg/weixinmsg.go @@ -44,10 +44,11 @@ func GetWeixinOpenIDsFromStoreID(storeID int) (retVal []string) { (SELECT id FROM weixins WHERE jxstoreid = ? AND parentid = -1) t2 ON t2.id = t1.parentid + WHERE openid IS NOT NULL UNION SELECT openid FROM weixins - WHERE jxstoreid = ? AND parentid = -1 + 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:%s, error:%v", storeID, err)