public JsonResult <object> FavoriteOperating(ArticleOperatingRequest request) { var baseInfo = GetBaseInfo(); _articleOperatingService.FavoriteArticle(baseInfo.UnionID, request.ArticleID); return(JsonNet("收藏操作成功")); }
public JsonResult <object> LikeOperating(ArticleOperatingRequest request) { if (request == null) { return(JsonError("请求数据不能为空")); } if (request.ArticleID == Guid.Empty || !_articleService.ExistData(request.ArticleID)) { return(JsonError("文章不存在")); } var baseInfo = GetBaseInfo(); if (!_weCharUserInfoService.Exist(baseInfo.UnionID)) { return(JsonError("用户不存在")); } _articleOperatingService.LikeArticle(baseInfo.UnionID, request.ArticleID); return(JsonNet("点赞操作成功")); }