package com.nbclass.activity.mapper; import java.util.List; import java.util.Map; import com.nbclass.activity.model.*; import org.apache.ibatis.annotations.Param; import com.nbclass.util.MyMapper; public interface ContentMapper extends MyMapper { /** * 根据id查找记录 * @param id * @return */ public Content findById(long id); /** * 根据条件查询列表 * @param entity * @return */ public List getList(Content entity); /** * 根据条件查询列表 - 前端页面查询 * @param entity * @return */ public List getListByFront(Content entity); /** * 根据id批量删除记录 * @param list */ public void deleteByIds(List list); /** * 删除关联的标签 * @param cid */ public void deleteTags(long cid); /** * 批量添加标签 * @param list */ public void insertContentTags(List list); /** * 通过内容ID删除图片集 * @param cid */ public void deleteImages(long cid); /** * 批量添加图片 * @param list */ public void insertContentImages(List list); /** * 添加点赞数阅读数 * @param type [view, like] * @param id */ public void updateContentNum(@Param("type")String type, @Param("id")Long id); /** * 查询案例标题和评论数和点赞数 * @return */ List getCaseTitle(); /** * 标签关联案例 * @param contentTags */ void addContentTags(ContentTags contentTags); /** * 获取自定义标签列表 * @return */ List getOtherLabels(); /** * 取消案例关联标签的关系 * @param idList */ void deleteContentTags(List idList); /** * 案例索引标签反馈次数+1 * @param contentId */ void updateLabelFeedback(Long contentId); /** * 根据条件查询列表 * @param entity * @return */ List getList2(Content entity); /** * 更新案例总评论数 * @param contentId */ void updateComments(Long contentId); /** * 添加案例评分 * @param userId * @param contentId * @param score */ void saveScore(@Param("userId") Long userId, @Param("contentId") Long contentId, @Param("score") Double score); /** * 查看用户是否已经打过分 * @param userId * @param contentId * @return */ int getScore(@Param("userId") Long userId, @Param("contentId") Long contentId); /** * 根据案例id查询案例详情 * @param contentId * @return */ Content getEditContent(Long contentId); /** * 提交审核申请单 * @param application */ void saveApplication(Application application); /** * 添加审核人信息 * @param check */ void saveCheck(Check check); /** *查询案例是否已提交过审核 * @param contentId * @return */ int getApplicationCount(Long contentId); /** * 删除案例审核申请 * @param applicationId */ void deleteApplication(Long applicationId); /** * 删除审核人信息 * @param applicationId */ void deleteCheck(Long applicationId); /** * 更新审核申请单状态 * @param applicationId */ void updateApplicationStatus(Long applicationId); /** * 更新审核人状态 * @param applicationId */ void updateCheckStatus(Long applicationId); /** * 获取审核列表 * @param entity * @return */ List getContentApplication(Content entity); /** * 更新审核表状态 * @param check */ void updateCheck(Check check); /** * 更新申请单状态 * @param application */ void updateApplication(Application application); /** * 查询案例id * @return */ Long getContentId(Long applicationId); /** * 更新案例状态 * @param contentId */ void updateContentRelease(@Param("contentId") Long contentId, @Param("release") Integer release, @Param("visibility") Integer visibility); /** * 根据案例id查询申请单信息 * @param contentId * @return */ Application getApplication(Long contentId); /** * 本周统计案例数量 * @return */ List getCensus(Integer type); /** * 获取今年的案例统计信息 * @return */ List getCensusLine(); /** * 获取前年的案例统计信息 * @return */ List getCencusLineLastYear(); }