public ActionResult Export(CommentsManageRefer search) { search.PageIndex = 1; search.PageSize = int.MaxValue; //会员昵称 if (!string.IsNullOrEmpty(search.CommentDetail.ShowNickName)) { search.CommentDetail.ShowNickName = search.CommentDetail.ShowNickName.Trim(); } //商品 if (!string.IsNullOrEmpty(search.CommentDetail.ProductCondition)) { search.CommentDetail.ProductCondition = search.CommentDetail.ProductCondition.Trim(); } //评论内容 if (!string.IsNullOrEmpty(search.CommentDetail.ContentInfo)) { search.CommentDetail.ContentInfo = search.CommentDetail.ContentInfo.Trim(); } //审核人 if (!string.IsNullOrEmpty(search.CommentDetail.CheckUser)) { search.CommentDetail.CheckUser = search.CommentDetail.CheckUser.Trim(); } //回复人 if (!string.IsNullOrEmpty(search.CommentDetail.ReplyUser)) { search.CommentDetail.ReplyUser = search.CommentDetail.ReplyUser.Trim(); } SearchExpar = search; return(Export("评论导出报表")); }
// GET: /CommentsManage/ /// <summary> /// 审核列表 /// </summary> /// <param name="search">请求参数</param> /// <param name="pids">评论id(可为多个)</param> /// <returns></returns> public ActionResult Index(CommentsManageRefer search, string pids) { var result = new CommentsManageRefer(); if (!string.IsNullOrEmpty(pids)) { search.CommentDetail.CommentIds = pids; result = CommentManageClient.Instance.QueryCommentsPageList(search); } else { //会员昵称 if (!string.IsNullOrEmpty(search.CommentDetail.ShowNickName)) { search.CommentDetail.ShowNickName = search.CommentDetail.ShowNickName.Trim(); } //商品 if (!string.IsNullOrEmpty(search.CommentDetail.ProductCondition)) { search.CommentDetail.ProductCondition = search.CommentDetail.ProductCondition.Trim(); } //评论内容 if (!string.IsNullOrEmpty(search.CommentDetail.ContentInfo)) { search.CommentDetail.ContentInfo = search.CommentDetail.ContentInfo.Trim(); } //审核人 if (!string.IsNullOrEmpty(search.CommentDetail.CheckUser)) { search.CommentDetail.CheckUser = search.CommentDetail.CheckUser.Trim(); } //回复人 if (!string.IsNullOrEmpty(search.CommentDetail.ReplyUser)) { search.CommentDetail.ReplyUser = search.CommentDetail.ReplyUser.Trim(); } result = CommentManageClient.Instance.QueryCommentsPageList(search); } ViewBag.Sum = search.PageSize; return(View(result)); }
/// <summary> /// 查询评论列表 /// </summary> /// <param name="request"></param> /// <returns></returns> public CommentsManageRefer QueryCommentsPageList(CommentsManageRefer request) { var result = new CommentsManageRefer(); var req = new QueryCommentsPageListReq() { QueryCommentsReqParam = Mapper.Map <VipCommentProductDetail, QueryCommentsReqParam>(request.CommentDetail), PageIndex = (int)request.PageIndex, PageSize = (int)request.PageSize }; var res = UpsServiceClient.Send <QueryCommentsPageListRes>(req); if (res.DoFlag) { result.List = Mapper.MappGereric <VipCommentProduct, VipCommentProductDetail>(res.VipCommnetsList); result.Total = res.TotalCount; } result.CommentDetail = request.CommentDetail; result.PageIndex = request.PageIndex; result.PageSize = request.PageSize; return(result); }