若依system模块登录日志页面。
前端发起三次请求,只有一次走到了后端接口,剩下的两次报sql语句错误(sql语句已经修改了)。
"msg": "\r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: FUNCTION ry-cloud.to_date does not exist\r\n### The error may exist in file [E:\IDEAoffice\EMSProjectSource\code\RuoYi-Cloud-v2\RuoYi-Cloud\ruoyi-modules\ruoyi-system\target\classes\mapper\system\SysLogininforMapper.xml]\r\n### The error may involve com.ruoyi.system.mapper.SysLogininforMapper.selectLogininforList-Inline\r\n### The error occurred while setting parameters\r\n### SQL: SELECT count(0) FROM sys_logininfor WHERE to_date(access_time, 'yyyymmdd') >= to_date(?, 'yyyymmdd') AND to_date(access_time, 'yyyymmdd') <= to_date(?, 'yyyymmdd')\r\n### Cause: java.sql.SQLSyntaxErrorException: FUNCTION ry-cloud.to_date does not exist\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: FUNCTION ry-cloud.to_date does not exist",
清除redis缓存,idea缓存都没有用。
mybatis一级缓存刷新和二级缓存禁用(在下面代码flushCache="true" useCache="false")。
怎么才能每次发起请求都走后台接口?
具体代码如下:
```xml
<select id="selectLogininforList" flushCache="true" useCache="false" parameterType="com.ruoyi.system.api.domain.SysLogininfor" resultMap="SysLogininforResult">
select info_id, user_name, ipaddr, status, msg, access_time from sys_logininfor
<where>
<if test="ipaddr != null and ipaddr != ''">
AND ipaddr like concat('%', #{ipaddr}, '%')
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>
<if test="userName != null and userName != ''">
AND user_name like concat('%', #{userName}, '%')
</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
and access_time >= #{params.beginTime}
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and access_time <= #{params.endTime}
</if>
</where>
order by info_id desc
</select>