예제 #1
0
파일: BLLUserScore.cs 프로젝트: uvbs/mmp
        public static bool SendTMAllUserScoreDailyAccountBillNotify(string websiteOwner)
        {
            BLLWeixin       bllWeixin = new BLLWeixin("");
            WeixinFollowers model     = Common.JSONHelper.JsonToModel <WeixinFollowers>(bllWeixin.GetFollower(bllWeixin.GetAccessToken(), string.Empty));

            while (model.count > 0)
            {
                Dictionary <string, object> dicOpenId = (Dictionary <string, object>)model.data;
                object[] openidArry = (object[])dicOpenId.First().Value;
                foreach (var openid in openidArry)
                {
                    UserInfo userInfo = bllWeixin.Get <UserInfo>(string.Format("WXOpenId='{0}' and WebsiteOwner='{1}'", openid, websiteOwner));
                    if (userInfo == null)
                    {
                        continue;
                    }
                    SendTMUserScoreDailyAccountBillNotify(userInfo.UserID, websiteOwner);
                }
                model = Common.JSONHelper.JsonToModel <WeixinFollowers>(bllWeixin.GetFollower(bllWeixin.GetAccessToken(), string.Empty));
            }
            return(true);
        }