fix:证明mapper中的文件是可以被重写的

上级 a780dec8
......@@ -9,8 +9,17 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@NoArgsConstructor
public class InterviewQuestionTypeDTO {
/**
* 问题类型编码
*/
private Integer questionType;
/**
* 问题类型名称
*/
private String name;
/**
* 问题类型数量
*/
private Integer typeSize;
}
......@@ -3,6 +3,7 @@ package com.kwan.springbootkwan.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kwan.springbootkwan.entity.InterviewQuestion;
import com.kwan.springbootkwan.entity.dto.InterviewQuestionTypeDTO;
import org.apache.ibatis.annotations.Param;
import java.util.LinkedList;
......@@ -20,5 +21,12 @@ public interface InterviewQuestionMapper extends BaseMapper<InterviewQuestion> {
* @return
*/
LinkedList<InterviewQuestionTypeDTO> questionType();
/**
* 获取面试题的种类
*
* @return
*/
LinkedList<InterviewQuestionTypeDTO> questionType(@Param("id") String id);
}
......@@ -64,6 +64,7 @@ public class InterviewQuestionServiceImpl extends ServiceImpl<InterviewQuestionM
LinkedList<InterviewQuestionTypeDTO> types = interviewQuestionMapper.questionType();
types.addFirst(new InterviewQuestionTypeDTO(0, "全部", 0));
for (InterviewQuestionTypeDTO interviewQuestionTypeDTO : types) {
//数据库存的是问题类型的编码
interviewQuestionTypeDTO.setName(InterviewQuestionTypeEnum.getNameByCode(interviewQuestionTypeDTO.getQuestionType()));
}
return types;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册