public int SendWechat_news(int CG_code, string fileName, string[] Users) { if (Users == null || Users.Length <= 0) { return(10000); } IList <string> _users_List = ReportWechat.GroupData(Users, 900); IList <string> _OpenIds = new List <string>(); foreach (string users in _users_List) { IList <CT_All_Users> user_list = GetWM_User(users); if (user_list != null && user_list.Count > 0) { foreach (CT_All_Users user in user_list) { _OpenIds.Add(user.MB_OpenID); } } } if (_OpenIds != null && _OpenIds.Count <= 0) { return(10000); } _OpenIds = ReportWechat.GroupData(_OpenIds, 10000); if (_OpenIds == null || _OpenIds.Count <= 0) { return(10000); } BL_CamRun _camRun = new BL_CamRun(); string _MaId = _camRun.GetMaterialId(CG_code, fileName); if (string.IsNullOrEmpty(_MaId)) { return(10000); } int _err = 10000; foreach (string openids in _OpenIds) { _err = wechatHandle.SendCustom_news_ArrayString(_MaId, openids); } return(_err); }
/// <summary> /// 处理文本内的各种参数,后期的所以处理方式都在此处修改 /// </summary> /// <param name="fileName"></param> /// <returns></returns> public string GetHandleContent(string fileName) { return(ReportWechat.GetFileInfo(fileName)); }
/// <summary> /// 从文件中查找图片路径 /// </summary> /// <param name="fileName"></param> /// <returns></returns> public string GetImageUrl(string fileName) { string fileContent = ReportWechat.GetFileInfo(fileName); return(ReportWechat.GetImgSrc(fileContent)); }