Cause:com.baomidou.mybatisplus.core.exceptions.MybatisPlusException:Failedtoprocess, please exclude the tableName or statementId.
ErrorSQL: select c.id from code_scanning_attribution c left join user_relation u on c.user_info_id = u.user_info_id
where c.parent =? c.deleted =0 and c.enabled =1 and u.author_user_id is null
解决办法:
在 MyBatis Plus 中,如果你遇到类似 MybatisPlusException: Failed to process, please exclude the tableName or statementId 的错误,通常是因为 SQL 语句中的表名或语句标识未被正确解析。根据你提供的 SQL 语句看起来缺少了一个逻辑操作符 and,可能导致解析失败。
你可以尝试修改你的 SQL 语句,确保语法正确,例如在 where 条件中添加缺失的 and 操作符:
select c.id
from code_scanning_attribution c
left join user_relation u on c.user_info_id = u.user_info_id
where c.parent =?AND c.deleted =0 and c.enabled =1 and u.author_user_id is null