| | |
| | | new LambdaQueryChainWrapper<>(questionAnswerMapper) |
| | | .like(StringUtils.hasText(questionAnswerVO.getQuestion()), QuestionAnswer::getQuestion, questionAnswerVO.getQuestion()) |
| | | .or(StringUtils.hasText(questionAnswerVO.getQuestion()), wrapper -> wrapper.like(QuestionAnswer::getAnswer, questionAnswerVO.getQuestion())) |
| | | .orderByDesc(QuestionAnswer::getId) |
| | | .orderByAsc(QuestionAnswer::getSequence) |
| | | .list()); |
| | | } |
| | | |
| | |
| | | public List<QuestionAnswer> list() { |
| | | return new LambdaQueryChainWrapper<>(questionAnswerMapper) |
| | | .eq(QuestionAnswer::getStatus, QuestionAnswerStatusEnum.ENABLE.getCode()) |
| | | .orderByAsc(QuestionAnswer::getSequence) |
| | | .list(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Integer getLastSequence() { |
| | | return questionAnswerMapper.getLastSequence(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |