示例#1
0
 public JsonResult CollectShop(int shopId, string comment, bool value)
 {
     try
     {
         _shopService.CollectShop(shopId, value);
         _shopCommentService.AddComment(UserId, shopId, comment, ShopCommentFlag.CollectShop.ToInt());
         _userFavShopService.AddOrRemove(UserId, shopId, string.Empty, value);
         return(Json(value ? "收藏店铺成功" : "取消成功", JsonRequestBehavior.AllowGet));
     }
     catch
     {
         return(Json("发生错误,请确认输入或者联系管理员", JsonRequestBehavior.AllowGet));
     }
 }