您的位置:首页 > 数据库

mybatis多个参数类型不同,sql语句中paramterType怎么写?

2017-08-18 19:05 351 查看
<select id="getTax" paramterType="int还是String" resultMap="BaseResultMap">
    SELECT e.ent_name,
      sum(u.total) total,
      e.id
    from ent_file e ,upload_tax u
    where DATE_FORMAT(tax_date,'%Y') = #{year}
    and e.ent_name = u.ent_name
    and u.plat_from =#{platFormId}   这里参数是int

    and e.address = #{address} 这里参数是String
    GROUP BY e.ent_name
    ORDER BY total desc
    limit 10
  </select>


使用Mybatis时,如果sql语句中的参数有多个,而且参数类型不同,那paramterType怎么写?

解决方案:不写了!不要paramterType了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  sql mybatis 参数
相关文章推荐