mybatis mapper.xml文件里调用Java静态方法
用法
SELECT count(*) FROM cnu_work WHERE <![CDATA[ work_date >= '${@com.poterliu.util.DateFormatUtil@dateFormat(@com.poterliu.util.TimeUtil@getBeginDayOfYesterday())}' AND work_date <= '${@com.poterliu.util.DateFormatUtil@dateFormat(@com.poterliu.util.TimeUtil@getEndDayOfYesterday())}' ]]>
注意事项⚠️
不能调用超过4层,3层还没有测试过!
参考
https://blog.csdn.net/ytzzh0726/article/details/76192831
https://blog.csdn.net/oppoppoppo/article/details/53407048
https://blog.csdn.net/qq_37168856/article/details/105093760
https://blog.csdn.net/qq496013218/article/details/68927382