zoukankan      html  css  js  c++  java
  • ssm升级springboot的sql坑

    1.  jsp页面的列表,没有值。

    原因,mapper的sql语句不兼容,在取值时,之前ssm时,用的是zhouyiAuthor.id,到 springboot时,用的是和接口文件一致的命名,没有中间的点。即authorId。

    <select id="getZhouyiContentsByAuthor"  resultMap="WithAuthorYaoResultMap" >
    select a.id aid,a.orderId,a.authorId,a.zhouyiId,a.content,a.tuan,a.xiang,a.info,
    b.id bid,b.name bname,
    c.id cid,c.yaoId,c.yaoIndex,
    d.id did,d.name dname,d.info dinfo
    from tbl_content a, tbl_author b ,tbl_yao c ,tbl_index d
    where  a.authorId =  b.id  and a.zhouyiId = c.id 
    and c.yaoIndex = d.id
    and  a.authorId = #{authorId,jdbcType=INTEGER}
    order by a.orderId asc
    </select>


    <!-- <select id="getZhouyiContentsByAuthor" resultMap="WithAuthorYaoResultMap" > select a.id aid,a.orderId,a.authorId,a.zhouyiId,a.content,a.tuan,a.xiang,a.info, b.id bid,b.name bname, c.id cid,c.yaoId,c.yaoIndex, d.id did,d.name dname,d.info dinfo from tbl_content a, tbl_author b ,tbl_yao c ,tbl_index d where a.authorId = b.id and a.zhouyiId = c.id and c.yaoIndex = d.id and a.authorId = #{zhouyiAuthor.id,jdbcType=INTEGER} order by a.orderId asc </select> -->
  • 相关阅读:
    SRM 551 div2
    HDU_4390 Number Sequence (容斥原理)
    HDU 多校联合第五场
    HDU 多校联合第六场
    POJ 2057 The Lost House (经典树形dp)
    Lucas定理
    HDU 4385 Moving Bricks (状态dp+贪心)
    HDU 多校联合第三场
    当最短路变成二维 _!
    POJ 1848 (一道不错的树形dp)
  • 原文地址:https://www.cnblogs.com/sdgtxuyong/p/14416303.html
Copyright © 2011-2022 走看看