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)