@@ -88,7 +88,7 @@ public class CommunityArticleController extends BaseController {
CommunityArticleCollect collect = communityArticleService.selectCommunityCollectById(communityArticleCollect);
if (Objects.isNull(collect)) {
//新增收藏
- isSuccess = communityArticleService.insertCommunityCollectById(collect);
+ isSuccess = communityArticleService.insertCommunityCollectById(communityArticleCollect);
message = "收藏成功";
} else {
//删除收藏
@@ -110,7 +110,7 @@ public class CommunityArticleServiceImpl implements ICommunityArticleService {
*/
@Override
public CommunityArticleCollect selectCommunityCollectById(CommunityArticleCollect collect) {
- return null;
+ return communityArticleMapper.selectCommunityCollectById(collect);
}
/**
@@ -177,7 +177,7 @@
</delete>
<!--收藏-->
- <select id="selectCommunityCollectById" resultMap="CommunityCollectResult">
+ <select id="selectCommunityCollectById" resultMap="CommunityCollectResult" parameterType="communityArticleCollect">
select collect_id, article_id, user_id, create_by, create_time, update_by, update_time from
community_article_collect
<where>