Mybatis
chaya97
码农成长中
展开
-
mybatis # 和$的区别
1 #是将传入的值当做字符串的形式,eg:select id,name,age from student where id =#{id},当前端把id值1,传入到后台的时候,就相当于select id,name,age from student where id ='1'. 2 $是将传入的数据直接显示生成sql语句,eg:select id,name,age from student wh...转载 2019-05-06 15:56:43 · 1181 阅读 · 0 评论 -
mabtis 字段有 0 的怎么查询
1.之前是这样写的 判断不会生效 <if test="findStatus ==null or findStatus == ''"> </if> 改成 <if test="findStatus != null"> AND t.find_status = #{findStatus} </if> ...原创 2019-05-16 16:39:52 · 166 阅读 · 1 评论