Mapper文件中写:

<select id="findExpiredCount" resultType="integer" parameterType="java.util.HashMap">
SELECT COUNT (*) as cnt from ${tableName} where created_datetime&lt;to_date(#{date},'yyyy-MM-dd') and created_user='12344' 
</select>

Java代码中写:

Map<String, String> expiredMap = new HashMap<String, String>();
expiredMap.put("tableName", tableName);
expiredMap.put("date", dateExpiredStr);
int countExpired = session.selectOne("findExpiredCount", expiredMap);

--END-- 2019-10-10

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
  • 2022-02-04
相关资源
相似解决方案