public object GetFightGroupOrderByUser(int page)
        {
            CheckUserLogin();
            int  pagesize = 5;
            long UserId   = CurrentUserId;
            var  userList = new List <FightGroupOrderInfo>();
            List <FightGroupOrderJoinStatus> seastatus = new List <FightGroupOrderJoinStatus>();

            seastatus.Add(FightGroupOrderJoinStatus.JoinSuccess);
            seastatus.Add(FightGroupOrderJoinStatus.BuildFailed);
            seastatus.Add(FightGroupOrderJoinStatus.BuildSuccess);
            var data     = FightGroupApplication.GetJoinGroups(UserId, seastatus, page, pagesize);
            var datalist = data.Models.ToList();

            List <FightGroupGetFightGroupOrderByUserModel> resultlist = new List <FightGroupGetFightGroupOrderByUserModel>();

            foreach (var item in datalist)
            {
                FightGroupGetFightGroupOrderByUserModel _tmp = new FightGroupGetFightGroupOrderByUserModel();
                _tmp.Id                  = item.Id;
                _tmp.ActiveId            = item.ActiveId;
                _tmp.ProductName         = item.ProductName;
                _tmp.ProductImgPath      = MallIO.GetRomoteImagePath(item.ProductImgPath);
                _tmp.ProductDefaultImage = MallIO.GetRomoteProductSizeImage(_tmp.ProductImgPath, 1, (int)ImageSize.Size_350);
                _tmp.GroupEndTime        = item.OverTime.HasValue ? item.OverTime.Value : item.GroupEndTime;
                _tmp.BuildStatus         = item.BuildStatus;
                _tmp.NeedNumber          = item.LimitedNumber - item.JoinedNumber;
                _tmp.UserIcons           = new List <string>();
                foreach (var sitem in item.GroupOrders)
                {
                    _tmp.UserIcons.Add(MallIO.GetRomoteImagePath(sitem.Photo));
                    if (sitem.OrderUserId == UserId)
                    {
                        _tmp.OrderId    = sitem.OrderId;
                        _tmp.GroupPrice = sitem.SalePrice;
                    }
                }
                resultlist.Add(_tmp);
            }
            dynamic _result = SuccessResult();

            _result.data  = resultlist;
            _result.total = data.Total;
            return(_result);
        }
        public JsonResult PostJoinGroups(int page)
        {
            curUserId = UserId;
            int pagesize = 5;
            List <FightGroupOrderJoinStatus> seastatus = new List <FightGroupOrderJoinStatus>();

            //seastatus.Add(FightGroupOrderJoinStatus.Ongoing);
            seastatus.Add(FightGroupOrderJoinStatus.JoinSuccess);
            seastatus.Add(FightGroupOrderJoinStatus.BuildFailed);
            seastatus.Add(FightGroupOrderJoinStatus.BuildSuccess);
            var data     = FightGroupApplication.GetJoinGroups(curUserId, seastatus, page, pagesize);
            var datalist = data.Models.ToList();
            List <MyFightGroupPostJoinGroupsModel> resultlist = new List <MyFightGroupPostJoinGroupsModel>();

            foreach (var item in datalist)
            {
                MyFightGroupPostJoinGroupsModel _tmp = new MyFightGroupPostJoinGroupsModel();
                _tmp.Id                  = item.Id;
                _tmp.ActiveId            = item.ActiveId;
                _tmp.ProductName         = item.ProductName;
                _tmp.ProductImgPath      = item.ProductImgPath;
                _tmp.ProductDefaultImage = HimallIO.GetProductSizeImage(_tmp.ProductImgPath, 1, (int)ImageSize.Size_350);
                _tmp.GroupEndTime        = item.OverTime.HasValue ? item.OverTime.Value : item.GroupEndTime;
                _tmp.BuildStatus         = item.BuildStatus;
                _tmp.NeedNumber          = item.LimitedNumber - item.JoinedNumber;
                _tmp.UserIcons           = new List <string>();
                foreach (var sitem in item.GroupOrders)
                {
                    _tmp.UserIcons.Add(sitem.Photo);
                    if (sitem.OrderUserId == curUserId)
                    {
                        _tmp.OrderId    = sitem.OrderId;
                        _tmp.GroupPrice = sitem.SalePrice;
                    }
                }
                resultlist.Add(_tmp);
            }
            return(Json(new { success = true, data = resultlist, total = data.Total }));
        }