mybatis 下hashMap 与 写 rusultMap="xxxMap" 的对比

    xiaoxiao2022-06-23  41

    <select id="findoneone" parameterType="int" resultType="java.util.HashMap" > select u.*,p.* from products u,productimg p where u.productid =p.productid and u.productid = #{productid} </select>

    hashMap 得到键值对  适合json         接收List<Map<string,Object>>

    resultMap 得到的是对象 适合组装   接收 resultMap 的type 

    转载请注明原文地址: https://ju.6miu.com/read-1123172.html

    最新回复(0)