用mybatis进行时间段筛选时,如果,查询本日,本月的信息量,我们可以使用like concat()函数来替换between..and

<select >
and b.nick_name like concat ('%','${name}','%')
</if>
order by totalCount desc
</select>

like这个地方需要用${}来取值,不能使用#{}来取值

相关文章:

  • 2021-07-13
  • 2021-08-23
  • 2022-12-23
  • 2021-11-08
  • 2021-09-08
  • 2021-08-09
  • 2021-12-31
  • 2021-07-24
猜你喜欢
  • 2022-12-23
  • 2021-05-04
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2023-03-21
相关资源
相似解决方案