🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
~~~ public List<Map> getLessonandQ(); ~~~ ~~~ <select id="getLessonandQ" resultType="map"> select l.*, e.name, e.introduction, e.jczs from lesson l, enterprise e where l.qid = e.qid </select> ~~~ ~~~ public static void getLessonandQ() { //1. 得到一个SqlSession() SqlSession session = DBUtils.getSession(); LessonMapper lessonMapper = session.getMapper(LessonMapper.class); List<Map> list = lessonMapper.getLessonandQ(); for(Map item :list) { System.out.println(item.get("lname") + "\t" + item.get("name")); } } ~~~