mybatis级联查询传参(map保存多参数传参)

来源:转载

Map map = new HashMap();
long userId = 1;
long paperId = 1;
map.put("userId", userId);
map.put("paperId",paperId);
session.update(
"com.mukitech.anji.bean.UserPaperMapper.updateStatus", map);
session.commit();


map保存传入参数,传入参数名为key,值为value



update user_paper set status=1 where user_id=#{userId} and paper_id = #{paperId}


user,papers,user_paper为中间表,与user_id和paper_id主键关联


带子条件的内联查询





分享给朋友:
您可能感兴趣的文章:
随机阅读: