/// <summary> /// 根据用户id,获取微信群 /// </summary> /// <param name="userid">The userid.</param> /// <returns>List<weChatGroupModel>.</returns> public List <UserWechatListModel> GetUserWeChatGroupListByUserId(int userid) { List <UserWechatListModel> data = new List <UserWechatListModel>(); var items = dal.GetUserWeChatGroupListByUserId(userid); if (items != null) { items.ForEach(item => { data.Add(new UserWechatListModel() { id = Convert.ToInt32(item.id), pid = item.pid, wechattitle = item.title, userid = userid }); }); } return(data); }