Exemple #1
0
        public void Send()
        {
            while (true)
            {
                try
                {
                    Log.Debug("主网、配网、监控 推送。");
                    InfoReleaseDal dal = new InfoReleaseDal();
                    DataTable dt = dal.QueryByTypes(new string[] { "3080_youo_zwtz", "3081_youo_pwtz", "3082_youo_jkxx" });

                    UserGroupDal userGroupDal = new UserGroupDal();
                    DataTable dtUser = userGroupDal.QueryInternalUser();
                    //发送:主网、配网、监控
                    foreach (DataRow row in dt.Rows)
                    {
                        Success = false;
                        var title = row["Title"].ToString();
                        var MessageDescription = row["MaterialContent"].ToString();
                        //var content = "标题:" + title + "\n内容:" + MessageDescription + "\n发布人:" + row["CreatePerson"].ToString();
                        var content = "标题:" + title + "\n内容:" + MessageDescription + "\n\r       国网铜陵供电公司";

                        foreach (DataRow row1 in dtUser.Rows)
                        {
                            var openId = row1["openid"].ToString();
                            SendMsg(openId, content);
                        }
                        if (Success)
                        {
                            dal.Modify(new InfoRelease()
                                {
                                    Id = row["id"].ToString(),
                                    FlagRelease = "2",
                                });
                        }
                    }

                    PowerCutDal powerCutDal = new PowerCutDal();
                    DataTable dtPowerCut = powerCutDal.Query(new PowerCut()
                        {
                            State = "1", //未送电
                            FlagRelease = "'2'", //已发布
                            DateBegin = DateTime.Now.Date,
                            DateEnd = DateTime.MaxValue.AddDays(-2),
                            BusinessType = "011_youo_tdtz2",
                        });
                    //发送:故障停电
                    Log.Debug("故障停电");
                    foreach (DataRow row in dtPowerCut.Rows)
                    {
                        Success = false;
                        var content = "尊敬的电力客户:\n\r       因突发电力故障,安排以下故障抢修工作安排。未经铜陵供电公司有关部门许可,严禁任何单位和个人在停电线路及设备上工作。为此造成的不便,敬请各客户给予谅解和支持。如有任何疑问,请致电供电公司24小时服务热线95598。\n\r       停电时间:" + row["PowerCutTime"].ToString().Split(' ')[0] + " " + row["TimeArea"].ToString() +
                          "\n\r       停电设备:" + row["Device"].ToString() + "\n\r       停电区域:" + row["Area"].ToString() + "\n\r       国网铜陵供电公司";

                        foreach (DataRow row1 in dtUser.Rows)
                        {
                            var openId = row1["openid"].ToString();
                            SendMsg(openId, content);
                        }
                        if (Success)
                        {
                            powerCutDal.Modify(new PowerCut()
                            {
                                Id = row["id"].ToString(),
                                FlagRelease = "3",
                            });
                            Log.Debug("修改状态为已推送--" + row["id"].ToString());
                        }
                    }

                    #region  发送最新资讯091_youo_zxzx

                    var sendMessage = new SendMessage();
                    var listnews = new List<Articles>();
                    var articles = new Articles();
                    InfoReleaseDal infoReleaseDal = new InfoReleaseDal();
                    DataTable yhcsDt = infoReleaseDal.Query(new InfoRelease()
                        {
                            FlagRelease = "1",
                            BusinessType = "091_youo_zxzx",
                        });

                    DataTable userDt = new UserInfoDal().Query(new UserInfo());//获取所有关注的微信用户
                    WebServ.WebService1 service1 = new WebService1();
                    var token = service1.GetToken();
                    foreach (DataRow row in yhcsDt.Rows)
                    {
                        var id = row["id"].ToString();
                        var discrip = row["MessageDescription"].ToString();
                        if (discrip.Length > 200)
                        {
                            discrip = discrip.Substring(0, 190) + "...";
                        }
                        articles = new Articles()
                        {
                            title = row["title"].ToString(),
                            description = discrip,
                            picurl = "http://60.173.29.191/UploadImages/091_youo_zxzx.jpg",
                            url = "http://60.173.29.191/views/messagelist/messagedetail.htm?id=" + id,
                        };
                        listnews.Add(articles);
                        foreach (DataRow uRow in userDt.Rows)
                        {
                            var openid = uRow["openid"].ToString();
                            sendMessage.SendNewsMessage(token, openid, listnews);
                        }
                        infoReleaseDal.Modify(new InfoRelease()
                            {
                                Id = id,
                                FlagRelease = "2",
                            });
                        Log.Debug("最新资讯-修改状态为已推送--" + row["id"].ToString());
                    }
                    #endregion

                    Thread.Sleep(10000);
                }
                catch (Exception ex)
                {
                    Log.Debug("发送故障" + ex);
                    Thread.Sleep(100000);
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// 获取事件的类别
        /// </summary>
        /// <param name="eventData">事件的类别值</param>
        /// <returns></returns>
        private MessageType GetEventDataType(string eventData)
        {
            MessageType resultType = MessageType.EventClick;
            var sendMessage = new SendMessage();
            switch (eventData)
            {
                case "CLICK":
                    {
                        resultType = MessageType.EventClick;
                        MenuEventLog menuEventLogModel = GetMenuEventLogModel(resultType);
                        MenuEventLogBll menuBll = new MenuEventLogBll();
                        menuBll.Add(menuEventLogModel);
                        log.Debug("菜单key:" + menuEventLogModel.menuId);
                        log.Debug("用户id:" + menuEventLogModel.FromUserName);
                        var listnews = new List<Articles>();
                        var articles = new Articles();
                        sendMessage.SendTxtMessage(menuEventLogModel.FromUserName, "系统升级中。");
                        //switch (menuEventLogModel.menuId)
                        //{
                        //    //这里风险告知信息和高压用户注册合并了,可以看case "025_youo_thzc":那行代码
                        //    case "023_youo_ydfx":
                        //        //sendMessage.SendNewsMessageFxgz(menuEventLogModel.FromUserName, menuEventLogModel.menuId, "风险告知信息", "1", "5");
                        //        break;
                        //    case "011_youo_tdtz":
                        //        sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, menuEventLogModel.menuId, "计划停电信息", "1", "5");
                        //        break;
                        //    case "011_youo_tdtz2":
                        //        sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, menuEventLogModel.menuId, "故障停电信息", "1", "5");
                        //        break;
                        //    case "012_youo_djzc":
                        //        //注意:电价政策,用电知识和营业网点三个菜单现在已经合并到 key="013_youo_jdzs",详细请见key="013_youo_jdzs"
                        //        // sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, menuEventLogModel.menuId, "电价政策信息", "1", "5");
                        //        break;
                        //    case "013_youo_jdzs":
                        //        listnews.Add(new Articles()
                        //        {
                        //            title = "用电知识",
                        //            picurl = _ip1 + "/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //            description = ""
                        //        });

                        //        listnews.Add(new Articles()
                        //        {
                        //            title = "最新资讯",
                        //            description = "查询最新资讯信息",
                        //            url = _ip1 + "/views/messagelist/messagelist.htm?key=091_youo_zxzx&wxid=" + menuEventLogModel.FromUserName + "&name=最新资讯信息&flag=1",
                        //            picurl = _ip1 + "/UploadImages/091_youo_zxzx.jpg"
                        //        });

                        //        listnews.Add(new Articles()
                        //        {
                        //            title = "电价政策",
                        //            description = "查询电价政策信息",
                        //            url = _ip1 + "/views/messagelist/messagelist.htm?key=012_youo_djzc&wxid=" + menuEventLogModel.FromUserName + "&name=电价政策信息&flag=1",
                        //            picurl = _ip1 + "/UploadImages/012_youo_djzc.jpg"
                        //        });

                        //        listnews.Add(new Articles()
                        //        {
                        //            title = "用电常识",
                        //            description = "查询更多用电常识信息",
                        //            url = _ip1 + "/views/messagelist/messagelist.htm?key=013_youo_jdzs&wxid=" + menuEventLogModel.FromUserName + "&name=用电常识信息&flag=1",
                        //            picurl = _ip1 + "/UploadImages/013_youo_jdzs.jpg"
                        //        });

                        //        listnews.Add(new Articles()
                        //        {
                        //            title = "营业网点",
                        //            description = "查询更多营业网点信息",
                        //            url = _ip1 + "/views/messagelist/messagelist.htm?key=015_youo_yywd&wxid=" + menuEventLogModel.FromUserName + "&name=营业网点信息&flag=1",
                        //            picurl = _ip1 + "/UploadImages/015_youo_yywd.jpg"
                        //        });
                        //        sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, listnews);
                        //        //sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, menuEventLogModel.menuId, "用电知识信息", "1", "5");
                        //        break;
                        //    case "015_youo_yywd":
                        //        //注意:电价政策,用电知识和营业网点三个菜单现在已经合并到 key="013_youo_jdzs",详细请见key="013_youo_jdzs"
                        //        //sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, menuEventLogModel.menuId, "营业网点信息", "1", "5");
                        //        break;
                        //    case "025_youo_thzc":

                        //        listnews.Add(new Articles()
                        //        {
                        //            title = "风险告知",
                        //            picurl = _ip1 + "/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //            description = ""
                        //        });

                        //        UserRegBll userRegBLL = new UserRegBll();
                        //        UserReg userRegModel = new UserReg();
                        //        userRegModel.Wxid = menuEventLogModel.FromUserName;
                        //        DataTable dt = userRegBLL.Query(userRegModel);
                        //        string strPhone = "";
                        //        if (dt != null && dt.Rows.Count > 0)
                        //        {
                        //            strPhone = dt.Rows[0]["PhoneNumber"].ToString();
                        //        }
                        //        listnews.Add(new Articles()
                        //        {
                        //            title = "风险预警通知单列表",
                        //            description = "风险预警通知单列表",
                        //            //url = _ip1 + "/views/messagelist/messagelist.htm?key=023_youo_ydfx&wxid=" + menuEventLogModel.FromUserName + "&name=风险告知信息&flag=0",
                        //            //url = _ip1 + "/views/app/app.htm",
                        //            url = _ip1 + "/views/qm/tzdlist.htm?phone=" + strPhone,
                        //            picurl = _ip1 + "/UploadImages/023_youo_ydfx.jpg"
                        //        });

                        //        //高压用户注册之前是写在 click事件里面的,现在放到风险告知里面
                        //        listnews.Add(new Articles()
                        //        {
                        //            title = "高压用户注册",
                        //            description = @"温馨提示:尊敬的客户:为保证您的用电安全,方便我们及时告知您用电风险,请专线大客户注册。请您按要求录入相关信息,每个单位请至少两人(用电分管领导、具体负责人)注册。谢谢!",
                        //            picurl = _ip1 + "/UploadImages/025_youo_thzc.jpg",
                        //            url = _ip1 + "/views/User/UserReg.html?key=025_youo_thzc&wxid=" + menuEventLogModel.FromUserName
                        //        });
                        //        sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, listnews);
                        //        break;
                        //    case "101_kh_dyxx":
                        //        articles = new Articles()
                        //        {
                        //            title = "短信订阅",
                        //            description = @"温馨提示: 您关注“国网铜陵供电公司”微信公众号为您短信自助订阅,订阅的客户,我们将为您提供电费信息自动发送,欠费信息自主提醒,让您及时方便了解用电信息!",
                        //            picurl = _ip1 + "/UploadImages/016_kh_qfcx.jpg",
                        //            url = _ip2 + "/SubscribeInfo.aspx?openid=" + menuEventLogModel.FromUserName
                        //        };
                        //        sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, articles);
                        //        break;
                        //    case "011_kh_hhbd":
                        //        articles = new Articles()
                        //        {
                        //            title = "户号绑定",
                        //            description = @"温馨提示: 您关注“国网铜陵供电公司”微信公众号并申请户号绑定后,可进行电量电费、阶梯电量、停电信息等服务信息查询。",
                        //            picurl = _ip1 + "/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //            url = _ip2 + "/WeixinBind.aspx?openid=" + menuEventLogModel.FromUserName
                        //        };
                        //        sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, articles);
                        //        break;
                        //    case "012_kh_yfdl":
                        //        articles = new Articles()
                        //        {
                        //            title = "电费电量",
                        //            description = @"温馨提示: 电量电费栏目可以清晰查看到您的用电状况,包括电表指数、合计电量、应缴电费及当期(两月一计)居民阶梯用电、分时用电等状况。",
                        //            picurl = _ip1 + "/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //            url = _ip2 + "/ElecBillInfo.aspx?openid=" + menuEventLogModel.FromUserName
                        //        };
                        //        sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, articles);
                        //        break;
                        //    case "013_kh_yhda":
                        //        articles = new Articles()
                        //        {
                        //            title = "用户档案",
                        //            description = @"温馨提示: 用户档案栏目提供客户用电资料的基本信息查询,包括用电地址、用户分类、用电类别、电压等级、计量点信息等。",
                        //            picurl = _ip1 + "/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //            url = _ip2 + "/ElecConsInfo.aspx?openid=" + menuEventLogModel.FromUserName
                        //        };
                        //        sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, articles);
                        //        break;
                        //    //case "014_kh_jtsf":
                        //    //    articles = new Articles()
                        //    //    {
                        //    //        title = "阶梯算费",
                        //    //        description = @"温馨提示: 阶梯算费栏目根据安徽省阶梯电价政策及您的用电量进行电费模拟计算。",
                        //    //        picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //    //        url = @"http://testweixin.anhuihuahong.com/hbdl_wxyx/hbdl_wap/hbdlPowerPrice?openid=" + menuEventLogModel.FromUserName
                        //    //    };
                        //    //    sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, articles);
                        //    //    break;
                        //    //case "015_kh_jtdl":
                        //    //    articles = new Articles()
                        //    //    {
                        //    //        title = "阶梯电量",
                        //    //        description = @"温馨提示: 阶梯电量按年累计结算,居民用户年累计用电量在2160度(180度×12月)以内部分,按第一档电价执行;2161度~4200度(350度×12月)部分,每度电加价5分钱;年累计用电量超过4200度后,则每度电加价0.3元。",
                        //    //        picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //    //        url = @"http://218.22.27.253:8893/ElecLevelInfo.aspx?openid=" + menuEventLogModel.FromUserName
                        //    //    };
                        //    //    sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, articles);
                        //    //    break;
                        //    case "016_kh_qfcx":
                        //        articles = new Articles()
                        //        {
                        //            title = "欠费查询",
                        //            description = @"温馨提示: 欠费信息查询。",
                        //            picurl = _ip1 + "/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //            url = _ip2 + "/OweAmtInfo.aspx?openid=" + menuEventLogModel.FromUserName
                        //        };
                        //        sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, articles);
                        //        break;
                        //    case "017_kh_jfjl":
                        //        articles = new Articles()
                        //        {
                        //            title = "缴费记录",
                        //            description = @"温馨提示: 缴费信息查询。",
                        //            picurl = _ip1 + "/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //            url = _ip2 + "/ChargeAmtInfo.aspx?openid=" + menuEventLogModel.FromUserName
                        //        };
                        //        sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, articles);
                        //        break;
                        //    case "320_youo_nbbg":
                        //        var userGroupDal = new UserGroupDal();
                        //        var usersDal = new UsersDal();
                        //        articles = new Articles()
                        //            {
                        //                title = "内部办公",
                        //                description = "",
                        //                picurl = _ip1 + "/UploadImages/" + menuEventLogModel.menuId + ".jpg"
                        //            };
                        //        listnews.Add(articles);
                        //        articles = new Articles()
                        //        {
                        //            title = "内部用户注册",
                        //            description = "",
                        //            // picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //            url = _ip1 + "/views/User/InternalUserReg.htm?key=" + menuEventLogModel.menuId + "&wxid=" + menuEventLogModel.FromUserName
                        //        };
                        //        listnews.Add(articles);
                        //        var data = userGroupDal.QueryPersonByGroupid(menuEventLogModel.FromUserName);
                        //        if (data)
                        //        {
                        //            articles = new Articles()
                        //            {
                        //                title = "主网跳闸信息列表",
                        //                description = "",
                        //                url = _ip1 + "/views/messagelist/messagelist.htm?key=3080_youo_zwtz&name=主网跳闸信息列表&flag=1"
                        //            };
                        //            listnews.Add(articles);
                        //            articles = new Articles()
                        //            {
                        //                title = "配网跳闸信息列表",
                        //                description = "",
                        //                url = _ip1 + "/views/messagelist/messagelist.htm?key=3081_youo_pwtz&name=配网跳闸信息列表&flag=1"
                        //            };
                        //            listnews.Add(articles);
                        //            articles = new Articles()
                        //            {
                        //                title = "监控信息列表",
                        //                description = "",
                        //                url = _ip1 + "/views/messagelist/messagelist.htm?key=3082_youo_jkxx&name=监控信息列表&flag=1"
                        //            };
                        //            listnews.Add(articles);
                        //            var data2 = usersDal.QueryByWxidAndMenuId(menuEventLogModel.FromUserName);
                        //            foreach (DataRow dataRow in data2.Rows)
                        //            {
                        //                switch (dataRow["id"].ToString())
                        //                {
                        //                    case "3080":
                        //                        articles = new Articles()
                        //                        {
                        //                            title = "主网跳闸信息发布",
                        //                            description = "",
                        //                            url = _ip1 + "/views/publishinfoTophone/publishTophone.htm?key=3080_youo_zwtz&name=主网跳闸信息发布&people=" + dataRow["name"]
                        //                        };
                        //                        listnews.Add(articles);
                        //                        break;
                        //                    case "3081":
                        //                        articles = new Articles()
                        //                           {
                        //                               title = "配网跳闸信息发布",
                        //                               description = "",
                        //                               url = _ip1 + "/views/publishinfoTophone/publishTophone.htm?key=3081_youo_pwtz&name=配网跳闸信息发布&people=" + dataRow["name"]
                        //                           };
                        //                        listnews.Add(articles);
                        //                        break;
                        //                    case "3082":
                        //                        articles = new Articles()
                        //                        {
                        //                            title = "监控信息发布",
                        //                            description = "",
                        //                            url = _ip1 + "/views/publishinfoTophone/publishTophone.htm?key=3082_youo_jkxx&name=监控信息发布&people=" + dataRow["name"]
                        //                        };
                        //                        listnews.Add(articles);
                        //                        break;
                        //                    default: break;
                        //                }
                        //            }
                        //        }
                        //        //else
                        //        //{
                        //        //    sendMessage.SendTxtMessage(menuEventLogModel.FromUserName, "您还不是内部用户,不支持此功能");
                        //        //}
                        //        sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, listnews);

                        //        break;
                        //    case "000_youo_help":
                        //        var listnewshelp = new List<Articles>();
                        //        articles = new Articles()
                        //        {
                        //            title = "新手指导",
                        //            description = "",
                        //            picurl = _ip1 + "/UploadImages/" + menuEventLogModel.menuId + ".jpg"
                        //        };
                        //        listnewshelp.Add(articles);
                        //        articles = new Articles()
                        //        {
                        //            title = "如何查找客户编号",
                        //            description = "",
                        //            // picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //            url = _ip1 + "/views/help/serchCustomerNumber.htm"
                        //        };
                        //        listnewshelp.Add(articles);
                        //        articles = new Articles()
                        //        {
                        //            title = "如何获取用电查询密码",
                        //            description = "",
                        //            // picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //            url = _ip1 + "/views/help/GetSelectPassword.htm"
                        //        };
                        //        listnewshelp.Add(articles);
                        //        articles = new Articles()
                        //        {
                        //            title = "如何绑定客户编号",
                        //            description = "",
                        //            // picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //            url = _ip1 + "/views/help/HowBindUser.htm"
                        //        };
                        //        listnewshelp.Add(articles);
                        //        articles = new Articles()
                        //        {
                        //            title = "如何设置默认客户",
                        //            description = "",
                        //            // picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //            url = _ip1 + "/views/help/HowBindDefaultUser.htm"
                        //        };
                        //        listnewshelp.Add(articles);
                        //        articles = new Articles()
                        //        {
                        //            title = "如何查询计划停电",
                        //            description = "",
                        //            // picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //            url = _ip1 + "/views/help/PlanCutPower.htm"
                        //        };
                        //        listnewshelp.Add(articles);
                        //        articles = new Articles()
                        //        {
                        //            title = "如何查询故障停电",
                        //            description = "",
                        //            // picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //            url = _ip1 + "/views/help/DefaultCutPower.htm"
                        //        };
                        //        listnewshelp.Add(articles);
                        //        articles = new Articles()
                        //        {
                        //            title = "如何注册高压用户",
                        //            description = "",
                        //            // picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                        //            url = _ip1 + "/views/help/HighVoltageUserReg.htm"
                        //        };
                        //        listnewshelp.Add(articles);
                        //        sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, listnewshelp);
                        //        break;
                        //}//switch
                        break;
                    }
                case "VIEW":
                    {
                        resultType = MessageType.EventView;
                        MenuEventLog menuEventLogModel = GetMenuEventLogModel(resultType);
                        MenuEventLogBll menuBll = new MenuEventLogBll();
                        menuBll.Add(menuEventLogModel);
                        break;
                    }
                case "subscribe":
                    {
                        resultType = MessageType.EventSubscribe;
                        Subscribe();//todo:关注事件
                        var listnewshelp = new List<Articles>();
                        var articles = new Articles();
                        articles = new Articles()
                        {
                            title = "新手指导",
                            description = "",
                            picurl = _ip1 + "/UploadImages/000_youo_help.jpg"
                        };
                        listnewshelp.Add(articles);
                        articles = new Articles()
                        {
                            title = "如何查找客户编号",
                            description = "",
                            // picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                            url = _ip1 + "/views/help/serchCustomerNumber.htm"
                        };
                        listnewshelp.Add(articles);
                        articles = new Articles()
                        {
                            title = "如何获取用电查询密码",
                            description = "",
                            // picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                            url = _ip1 + "/views/help/GetSelectPassword.htm"
                        };
                        listnewshelp.Add(articles);
                        articles = new Articles()
                        {
                            title = "如何绑定客户编号",
                            description = "",
                            // picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                            url = _ip1 + "/views/help/HowBindUser.htm"
                        };
                        listnewshelp.Add(articles);
                        articles = new Articles()
                        {
                            title = "如何设置默认客户",
                            description = "",
                            // picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                            url = _ip1 + "/views/help/HowBindDefaultUser.htm"
                        };
                        listnewshelp.Add(articles);
                        articles = new Articles()
                        {
                            title = "如何查询计划停电",
                            description = "",
                            // picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                            url = _ip1 + "/views/help/PlanCutPower.htm"
                        };
                        listnewshelp.Add(articles);
                        articles = new Articles()
                        {
                            title = "如何查询故障停电",
                            description = "",
                            // picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                            url = _ip1 + "/views/help/DefaultCutPower.htm"
                        };
                        listnewshelp.Add(articles);
                        articles = new Articles()
                        {
                            title = "如何注册高压用户",
                            description = "",
                            // picurl = "http://218.22.27.236/tl/UploadImages/" + menuEventLogModel.menuId + ".jpg",
                            url = _ip1 + "/views/help/HighVoltageUserReg.htm"
                        };
                        listnewshelp.Add(articles);
                        MenuEventLog menuEventLogModel = GetMenuEventLogModel(resultType);
                        sendMessage.SendNewsMessage(menuEventLogModel.FromUserName, listnewshelp);
                        break;
                    }
                case "unsubscribe":
                    {
                        resultType = MessageType.EventUnsubscribe;
                        UnSubscribe();
                        break;
                    }
                case "SCAN":
                    {
                        resultType = MessageType.EventScan;
                        break;
                    }
                case "LOCATION"://todo:地理位置推送事件用户同意上报地理位置后,每次进入公众号会话时,都会在进入时上报地理位置,或在进入会话后每5秒上报一次地理位置,公众号可以在公众平台网站中修改以上设置。上报地理位置时,微信会将上报地理位置事件推送到开发者填写的URL。
                    {
                        resultType = MessageType.EventLocation;
                        //GetLocationModel();
                        break;
                    }

                default:
                    {
                        resultType = MessageType.NULL;
                        break;
                    }
            }
            return resultType;
        }