新手出道

验证了很久sum()里面带参数方式 #{参数}一直不行日志显示参数已经传进 但就是加不上去 返回的始终是0

后面换成$(参数)之后就行了

@Select("select sum(${type}) from "+ TABLE_HOUR + " where date_format(`date`,'%Y-%m-%d') = #{date}")
public int selectDay2(@Param("date") String date,@Param("type") String type);

相关文章:

  • 2022-12-23
  • 2021-08-02
  • 2022-01-14
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-28
  • 2021-07-06
  • 2022-12-23
  • 2021-10-01
相关资源
相似解决方案