/// <summary> /// 获取站内信的数量 /// </summary> /// <param name="uid"></param> /// <param name="tinstatcount">系统信息量</param> /// <param name="follcount">关注量</param> /// <param name="zancount">赞量</param> /// <param name="msgcount">评论量</param> /// <returns></returns> public int InstationInfo(int uid, out int tinstatcount, out int follcount, out int zancount, out int msgcount) { List <ViewtInstationInfo> listWhere0 = tinstaclient.GetPageListWhereUidAndloginType(uid, 0, out tinstatcount); List <ViewFollow> folllistWhere0 = followclient.GetFollowQuiltUidList(uid, 0, out follcount); List <ViewtZanModels> zanlistWhere0 = zanclient.GetByFromUidList(uid, 0, out zancount); List <ViewtMessage> msglistWhere0 = messageclient.GetPageListWhereUidAndloginType(uid, 0, out msgcount); return(0); }
/// <summary> /// 查看别人的瑜珈圈 /// </summary> /// <param name="Uid"></param> /// <returns></returns> public ActionResult Index(int Uid) { ViewBag.id = Uid; #region 瑜伽圈 list = client.GetFollowQuiltUidList(Uid); List <ViewFollowUserDetail> listGroup = new List <ViewFollowUserDetail>(); foreach (var item in list) { //登录表 ViewYogaUser umodel = yuserclient.GetYogaUserById(item.QuiltUid); ViewFollowUserDetail model = new ViewFollowUserDetail(); model.FollowersName = umodel.NickName; model.flag = item.iType.Value; if (item.iType == 0) { //习练者 ViewYogaUserDetail udmodel = userdetailsclient.GetYogaUserDetailById(item.QuiltUid); model.spic = CommonInfo.GetDisplayImg(udmodel.DisplayImg); model.userurl = "/YogaUserDetail/Details/"; model.uid = udmodel.UID; //登录表 model.nickname = yuserclient.GetYogaUserById(item.QuiltUid).NickName; //粉丝 model.FollowCount = client.GetFollowByCount(item.Uid); model.FollowersCount = client.GetFollowByCount(item.QuiltUid);//你关注的人的粉丝 model.Leval = udmodel.Ulevel; listGroup.Add(model); } else if (item.iType == 1) { //导师 ViewYogisModels mmodel = modelclient.GetYogisModelsById(item.QuiltUid); model.spic = CommonInfo.GetDisplayImg(mmodel.DisplayImg); //登录表 model.nickname = yuserclient.GetYogaUserById(item.QuiltUid).NickName; if (mmodel.YogisLevel != null) { if (mmodel.YogisLevel == 4) { model.userurl = "/YogaGuru/Details/"; model.nickname = mmodel.RealName; } else { model.userurl = "/YogisModels/Details/"; } } else { model.userurl = "/YogisModels/Details/"; } model.uid = mmodel.UID; //粉丝 model.FollowCount = client.GetFollowByCount(item.Uid); model.FollowersCount = client.GetFollowByCount(item.QuiltUid);//你关注的人的粉丝 model.Leval = mmodel.YogisLevel.Value; listGroup.Add(model); } } ViewBag.listGroup = listGroup; #endregion return(View(list)); }
//被关注 public ActionResult FollowIndex(int page = 1) { List <ViewFollow> listWhere0 = followclient.GetFollowQuiltUidList(user.Uid, 0, out count); if (count > 0) { //第一次登录 foreach (ViewFollow item in listWhere0) { item.loginType = 1; followclient.Update(item); } } else { List <ViewFollow> listWhere1 = followclient.GetFollowQuiltUidList(user.Uid, 1, out count); if (count > 0) { foreach (ViewFollow item in listWhere1) { item.loginType = 2; followclient.Update(item); } } } List <ViewFollow> followlist = followclient.GetFollowQuiltUidList(user.Uid, page, 10, out count); PagedList <ViewFollow> pagelist = new PagedList <ViewFollow>(followlist, page, 10, count); #region List <ViewFollowUserDetail> listFollowGroup = new List <ViewFollowUserDetail>(); foreach (var item in followlist) { ViewYogaUser userEntity = clientUser.GetYogaUserById(item.Uid); ViewFollowUserDetail model = new ViewFollowUserDetail(); model.FollowersName = userEntity.NickName;//昵称 model.flag = item.iType.Value; model.CreateTime = item.FollowDate; model.iNew = item.loginType.Value; if (userEntity.UserType == 0) { //习练者 ViewYogaUserDetail udmodel = udclient.GetYogaUserDetailById(item.Uid); model.spic = CommonInfo.GetDisplayImg(udmodel.DisplayImg); model.userurl = "/YogaUserDetail/Details/"; model.uid = udmodel.UID; listFollowGroup.Add(model); } else if (userEntity.UserType == 1) { //导师 ViewYogisModels mmodel = clientModel.GetYogisModelsById(item.Uid); model.spic = CommonInfo.GetDisplayImg(mmodel.DisplayImg); if (mmodel.YogisLevel == 4) { model.userurl = "/YogaGuru/Details/"; model.nickname = mmodel.RealName; } else { model.userurl = "/YogisModels/Details/"; } model.uid = mmodel.UID; listFollowGroup.Add(model); } } ViewBag.listFollowGroup = listFollowGroup; #endregion return(View("FollowIndex", pagelist)); }