我正在从事Spring Boot项目,我需要帮助来解决此意外的令牌错误。
此SQL代码在Mysql工作台上完美运行,但在spring boot项目中不起作用。
queryCondition = queryCondition + " AND d.dateCreated BETWEEN
CURRENT_TIMESTAMP() AND DATE_ADD(CURRENT_TIMESTAMP(), INTERVAL 3 MONTH) ";
List<SearchCountDto> referralSourceCount = em.createQuery(
"SELECT new
com.maytech.tusker.iamapi.dto.common.SearchCountDto(COUNT(d.id)) " +
" FROM Deal d" +
" WHERE d.id = d.id "+ queryCondition,
SearchCountDto.class)
.getResultList();