using Mini.Common; using Mini.Model.ViewModel; using Mini.Model.WxEntity; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Mini.Web.WebHelper { public class WxMessageHandler { public static string GetRcontactNickName(WX_WorkRCONTACT rcontact) { string text = string.Empty; if (!string.IsNullOrEmpty(rcontact.NICKNAME)) { text = rcontact.NICKNAME; } else if (!string.IsNullOrEmpty(rcontact.ALIAS)) { text = rcontact.ALIAS; } else if (!string.IsNullOrEmpty(rcontact.USERNAME)) { text = rcontact.USERNAME; } if (!string.IsNullOrEmpty(rcontact.CONREMARK)) { text += "(" + rcontact.CONREMARK + ")"; } return text; } public static string GetRcontactNickNameByRcontact(Wx_Rcontact rcontact) { string text = string.Empty; if (rcontact == null) { return text; } if (!string.IsNullOrEmpty(rcontact.nickname)) { text = rcontact.nickname; } else if (!string.IsNullOrEmpty(rcontact.alias)) { text = rcontact.alias; } else if (!string.IsNullOrEmpty(rcontact.username)) { text = rcontact.username; } if (!string.IsNullOrEmpty(rcontact.conremark)) { text += "(" + rcontact.conremark + ")"; } return text; } public string GeJsontPath(string url) { string wocha = Utility.GetData(url, "", Encoding.UTF8); return wocha; } } }