mapper.xml中的sql定义 select * from sys_sms_send_record where check_status = #{checkStatus} order by submit_time asc limit #{limit} for update

3.5.6版本,执行时,实际执行的语句为 select * from sys_sms_send_record where check_status = 0 for update order by submit_time asc limit 10

for update的位置被插入到 order by之前,执行sql出错,3.5.5版本无此问题。

Comment From: nieqiurong

提供插件配置,和mapper层方法.

Comment From: billydong1973

@Bean public MybatisPlusInterceptor mybatisPlusInterceptor() { MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); // 多租户插件 必须放到第一位 try { TenantLineInnerInterceptor tenant = SpringUtils.getBean(TenantLineInnerInterceptor.class); interceptor.addInnerInterceptor(tenant); log.info("已加载多租户插件"); } catch (BeansException ignore) { } // 数据权限处理 interceptor.addInnerInterceptor(dataPermissionInterceptor()); // 分页插件 interceptor.addInnerInterceptor(paginationInnerInterceptor()); // 乐观锁插件 interceptor.addInnerInterceptor(optimisticLockerInnerInterceptor()); // 防全表更新 interceptor.addInnerInterceptor(blockAttackInnerInterceptor()); return interceptor; }

mapper.java public interface SysSmsSendRecordMapper extends BaseMapper {

List selectByCheckStatus(int checkStatus, int limit);

List selectBySendStatus(Long sendStatus, int limit);

}

mapper.xml

Comment From: nieqiurong

https://github.com/JSQLParser/JSqlParser/issues/1995

Comment From: nieqiurong

已经反馈给JSqlParser

Comment From: nieqiurong

已发布 3.5.8-SNAPSHOT