/// <summary> /// 商品评价回复列表 /// </summary> public ActionResult ProductReviewReplyList(int reviewId = -1) { ProductReviewInfo productReviewInfo = AdminProductReviews.AdminGetProductReviewById(reviewId); if (productReviewInfo == null) { return(PromptView("商品评价不存在")); } ProductReviewReplyListModel model = new ProductReviewReplyListModel() { ProductReviewReplyList = AdminProductReviews.AdminGetProductReviewReplyList(reviewId), }; MallUtils.SetAdminRefererCookie(string.Format("{0}?reviewId={1}", Url.Action("productreviewreplylist"), reviewId)); return(View(model)); }
/// <summary> /// 删除商品评价 /// </summary> public ActionResult DelProductReview(int reviewId) { ProductReviewInfo productReviewInfo = AdminProductReviews.AdminGetProductReviewById(reviewId); if (productReviewInfo == null) { return(PromptView("商品评价不存在")); } if (productReviewInfo.StoreId != WorkContext.StoreId) { return(PromptView("不能删除其它店铺的商品评价")); } AdminProductReviews.DeleteProductReviewById(reviewId); AddStoreAdminLog("删除商品评价", "删除商品评价,商品评价ID为:" + reviewId); return(PromptView("商品评价删除成功")); }
/// <summary> /// 改变商品评价的状态 /// </summary> public ActionResult ChangeProductReviewState(int reviewId = -1, int state = -1) { ProductReviewInfo productReviewInfo = AdminProductReviews.AdminGetProductReviewById(reviewId); if (productReviewInfo == null || productReviewInfo.StoreId != WorkContext.StoreId) { return(Content("0")); } bool result = AdminProductReviews.ChangeProductReviewState(reviewId, state); if (result) { AddStoreAdminLog("修改商品评价状态", "修改商品评价状态,商品评价ID和状态为:" + reviewId + "_" + state); return(Content("1")); } else { return(Content("0")); } }