为什么我的ibatis里面用$传递参数一直报错啊?源代码如下:
try{Mapmap=newHashMap();map.put("follower",follower);map.put("follwee",followee);retu...
try {
Map map=new HashMap();
map.put("follower", follower);
map.put("follwee", followee);
return (UserTO)sqlMapClient.queryForObject("user.getFollowerById", map);
} catch(Exception e) {
throw new WeiboException(e);
}
sql语句如下:
<select id="getFollowerById" resultMap="userTO">
select ID, USERNAME, PASSWORD, NICKNAME, GENDER, STATUS, CREATED_DATE, FOLLOWER_CNT, FOLLOWEE_CNT from WEIBO_USER where ID in(select FOLLOWER from WEIBO_FOLLOW where FOLLOWER = $follower$ and FOLLOWEE = $followee$)
</select>
知道错误出在哪里了, map.put("follwee", followee);followee写错了 展开
Map map=new HashMap();
map.put("follower", follower);
map.put("follwee", followee);
return (UserTO)sqlMapClient.queryForObject("user.getFollowerById", map);
} catch(Exception e) {
throw new WeiboException(e);
}
sql语句如下:
<select id="getFollowerById" resultMap="userTO">
select ID, USERNAME, PASSWORD, NICKNAME, GENDER, STATUS, CREATED_DATE, FOLLOWER_CNT, FOLLOWEE_CNT from WEIBO_USER where ID in(select FOLLOWER from WEIBO_FOLLOW where FOLLOWER = $follower$ and FOLLOWEE = $followee$)
</select>
知道错误出在哪里了, map.put("follwee", followee);followee写错了 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询