一.Mybatis中用#{}和${}获取输入参数的区别 1.“#{}“和“${}”都可以从接口输入中的map对象或者pojo对象中获取输入的参数值.例如 <mapper namespace="com.hh.dao.UserDao"> <select id="selectByIdList" resultType="com.hh.domain.SysUser"> select * from user where id=#{id
sql语句select * from producttg where hospitalcode in (1,2,3) 获取到的数据并不是按照条件1,2,3的顺序排列,如果要成下面形式(mybatis语句) select * from producttg where productno in ${productnolist} order by CHARINDEX(','+ltrim(productno)+',',',${productnostr}') 其中输入为productnolist(Str