Mapper接口如下:
- 例1
@Select("SELECT t_question.*,t_student.`name` FROM t_question,t_student WHERE t_question.student_id=t_student.id") List<QuestionStudentVO> getQuestionStudent(Pagination page);
- 例2
@Select("SELECT a.id,a.`name`,a.age,b.`describe` FROM USER a LEFT JOIN userinfo b ON a.id = b.user_id where a.id=#{id}")
List<Map<String, Object>> dyGetUserList(Page<Map<String,Object>> page,Integer id);