MCPcopy Create free account
hub / github.com/diyhi/bbs / AnswerRepository

Interface AnswerRepository

src/main/java/cms/repository/question/AnswerRepository.java:18–274  ·  view source on GitHub ↗

答案管理接口

Source from the content-addressed store, hash-verified

16 *
17 */
18public 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);

Callers 34

editAnswerMethod · 0.65
deleteAnswerMethod · 0.65
addAnswerReplyMethod · 0.65
addReportMethod · 0.65
editAnswerMethod · 0.65
addAnswerReplyMethod · 0.65
deleteAnswerMethod · 0.65
getAnswerPageMethod · 0.65
getQuestionDetailMethod · 0.65

Implementers 1

AnswerRepositoryImplsrc/main/java/cms/repository/question/

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…