system-news/src/main/java/com/cm/news/dao/newscomment/INewsCommentDao.java
2021-01-05 12:01:22 +08:00

87 lines
2.4 KiB
Java

package com.cm.news.dao.newscomment;
import com.cm.common.exception.RemoveException;
import com.cm.common.exception.SaveException;
import com.cm.common.exception.SearchException;
import com.cm.common.exception.UpdateException;
import com.cm.common.result.SuccessResultList;
import com.cm.news.pojo.dtos.newscomment.NewsCommentCountDTO;
import com.cm.news.pojo.dtos.newscomment.NewsCommentDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* @ClassName: INewsCommentDao
* @Description: 新闻评论记录表
* @Author: WenG
* @Date: 2020-05-07 14:01
* @Version: 1.0
**/
@Repository
public interface INewsCommentDao {
/**
* 新增新闻评论记录表
*
* @param params
* @throws SaveException
*/
void saveNewsComment(Map<String, Object> params) throws SaveException;
/**
* 删除新闻评论记录表
*
* @param params
* @throws RemoveException
*/
void removeNewsComment(Map<String, Object> params) throws RemoveException;
/**
* 修改新闻评论记录表
*
* @param params
* @throws UpdateException
*/
void updateNewsComment(Map<String, Object> params) throws UpdateException;
/**
* 新闻评论记录表详情
*
* @param params
* @return
* @throws SearchException
*/
NewsCommentDTO getNewsComment(Map<String, Object> params) throws SearchException;
/**
* 新闻评论记录表列表
*
* @param params
* @return
* @throws SearchException
*/
List<NewsCommentDTO> listNewsComment(Map<String, Object> params) throws SearchException;
Integer countByParentId(String s) throws SearchException;
void updateNewsCommentLikeCount(Map<String, Object> params) throws UpdateException;
void updateNewsCommentDislikeCount(Map<String, Object> params) throws UpdateException;
void updateNewsCommentStatus(Map<String, Object> params) throws UpdateException;
List<NewsCommentDTO> getNewsCommentByNewsContentIdAndCommentContent(Map<String, Object> queryParams) throws SearchException;
Integer getCountByNewsContentId(Map<String, Object> params) throws SearchException;
/**
* 统计新闻总数
*
* @param params 参数
* @return
* @throws SearchException
*/
List<NewsCommentCountDTO> listCountByNewsContentIds(Map<String, Object> params) throws SearchException;
}