答案管理接口
| 16 | * |
| 17 | */ |
| 18 | public interface AnswerRepository extends DAO<Answer> { |
| 19 | /** |
| 20 | * 根据答案Id查询答案 |
| 21 | * @param answerId 答案Id |
| 22 | * @return |
| 23 | */ |
| 24 | public Answer findByAnswerId(Long answerId); |
| 25 | /** |
| 26 | * 根据答案Id集合查询答案 |
| 27 | * @param answerIdList 答案Id集合 |
| 28 | * @return |
| 29 | */ |
| 30 | public List<Answer> findByAnswerIdList(List<Long> answerIdList); |
| 31 | /** |
| 32 | * 根据用户名称查询回答数量 |
| 33 | * @param userName 用户名称 |
| 34 | * @return |
| 35 | */ |
| 36 | public Long findAnswerCountByUserName(String userName); |
| 37 | /** |
| 38 | * 根据答案Id查询答案在表的第几行 |
| 39 | * @param answerId 答案Id |
| 40 | * @param questionId 问题Id |
| 41 | * @return |
| 42 | */ |
| 43 | public Long findRowByAnswerId(Long answerId,Long questionId); |
| 44 | /** |
| 45 | * 根据答案Id查询答案在表的第几行 |
| 46 | * @param answerId 答案Id |
| 47 | * @param questionId 问题Id |
| 48 | * @param status 状态 |
| 49 | * @param sort 按发表时间排序 1.desc 2.asc |
| 50 | * @return |
| 51 | */ |
| 52 | public Long findRowByAnswerId(Long answerId,Long questionId,Integer status,Integer sort); |
| 53 | /** |
| 54 | * 分页查询答案内容 |
| 55 | * @param firstIndex 索引开始 |
| 56 | * @param maxResult 获取数量 |
| 57 | * @param userName 用户名称 |
| 58 | * @param isStaff 是否为员工 |
| 59 | * @return |
| 60 | */ |
| 61 | public List<String> findAnswerContentByPage(int firstIndex, int maxResult,String userName,boolean isStaff); |
| 62 | /** |
| 63 | * 分页查询答案 |
| 64 | * @param userName 用户名称 |
| 65 | * @param postTime 评论发表时间 |
| 66 | * @param firstIndex 索引开始 |
| 67 | * @param maxResult 获取数量 |
| 68 | * @return |
| 69 | */ |
| 70 | public List<Answer> findAnswerByPage(String userName, LocalDateTime postTime, int firstIndex, int maxResult); |
| 71 | /** |
| 72 | * 保存答案 |
| 73 | * @param answer 答案 |
| 74 | */ |
| 75 | public void saveAnswer(Answer answer); |
no outgoing calls
no test coverage detected
searching dependent graphs…