• mybatis查询返回hashmap相关问题


    记录是为了更好的成长!

    1、mapper.xml描述,注意是parameterType 和 resultType  

       <select id="findExamineInfoByYear" parameterType="java.util.HashMap" resultType="java.util.HashMap"> 
            select emid,datetime,totalscore,selfscore from examine ,examscore 
            where examine.selfscore = examscore.id 
            and examine.emid = #{emid} and examine.year = #{year}
        </select>

    2、对应的mapper接口

    List<Map> findExamineInfoByYear(Map map);

    3、返回到页面的json数据格式

    [{"selfscore":4,"datetime":"2018-11-12","totalscore":"73","emid":1},{"selfscore":3,"datetime":"2018-12-12","totalscore":"32","emid":1}]

    以上内容代表个人观点,仅供参考,不喜勿喷。。。

  • 相关阅读:
    数据流图
    数据库设计
    多媒体基础知识
    面向对象程序设计
    UML建模
    warning: integer overflow in expression [Woverflow]
    unmatched/skipped datagrams
    MFC
    D3DWindower
    cheatengine
  • 原文地址:https://www.cnblogs.com/newbest/p/10018685.html
Copyright © 2020-2023  润新知