WHERE 1=1
AND PAY_TIME BETWEEN '${starttime}' AND '${endtime}'
我本身用日期的between就是一直这么用的
比如
AND C.FACTORYDATE BETWEEN '${dtdDateStart}' AND '${dtdDateEnd}'
输入dtdDateStart为2020-01-02 dtdDateEnd为2020-02-02 运行结果为:
AND C.FACTORYDATE BETWEEN '2020-01-02' AND '2020-02-02'