Esempio n. 1
0
        //
        // GET: /HotSubject/

        public ActionResult Index(HotSubjectRefer refer)
        {
            if (refer.Search.ApplyPlace == null)
            {
                refer.Search.ApplyPlace = "1";
            }
            if (refer.Search.IsExpire == 0)
            {
                refer.Search.IsExpire = 1;
            }
            if (refer.Search.IsEnable == null)
            {
                refer.Search.IsEnable = true;
            }
            var result = HotStyleClient.Instance.QueryHotSubjectPageList(refer);

            return(View(result));
        }
Esempio n. 2
0
        /// <summary>
        /// 查询列表
        /// </summary>
        /// <param name="refer"></param>
        /// <returns></returns>
        public HotSubjectRefer QueryHotSubjectPageList(HotSubjectRefer refer)
        {
            var req      = refer.Search;
            var ret      = new HotSubjectRefer();
            var isEnable = !(req.QueryIsEnable == 2);
            var response = GoodsClient.Send <GetHotSubjectListResponse>(new GetHotSubjectList
            {
                ApplyPlace  = req.ApplyPlace,
                IsEnable    = isEnable,
                IsExpire    = req.IsExpire,
                SubjectName = req.SubjectName,
                PageIndex   = refer.PageIndex,
                PageSize    = refer.PageSize,
            });

            ret.List      = Mapper.MappGereric <GetHotSubjectDto, HotSubjectModel>(response.Dtos);
            ret.PageIndex = response.PageIndex;
            ret.PageSize  = response.PageSize;
            ret.Total     = response.Total;
            return(ret);
        }