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> -->
原文地址:https://www.cnblogs.com/sdgtxuyong/p/14416303.html