没有role_id ,执行sql全部报错,不想被拦截

Blade 未结 1 1025
肚子饿了
肚子饿了 剑童 2020-06-17 19:16

一、该问题的重现步骤是什么?

1. 我用的是2.5的,现在登入的用户不是你们user表的用户,是自己新建表的用户。 然后没有角色id  ,执行任何sql都报错,

3.


二、你期待的结果是什么?实际看到的又是什么?

    我只想普普通通的执行我写的sql,不要给我拦截数据权限

三、你正在使用的是什么产品,什么版本?在什么操作系统上?

    用的2.5 ,在win10上

四、请提供详细的错误堆栈信息,这很重要。

        

axios.js?b5c6:69 Uncaught (in promise) Error: nested exception is org.apache.ibatis.exceptions.PersistenceException: 

### Error querying database.  Cause: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select resource_code, scope_column, scope_field, scope_type, scope_value from blade_scope_data where scope_class = ? and id in (select scope_id from blade_role_scope where scope_category = 1 and role_id in ())]; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1

### The error may exist in file [F:\workspace\jnds\bladex-boot\target\classes\org\springblade\common\utils\keyValue\mapper\KeyValueMapper.xml]

### The error may involve org.springblade.common.utils.keyValue.mapper.KeyValueMapper.getKeyValueList

### The error occurred while executing a query

### Cause: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select resource_code, scope_column, scope_field, scope_type, scope_value from blade_scope_data where scope_class = ? and id in (select scope_id from blade_role_scope where scope_category = 1 and role_id in ())]; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1


五、若有更多详细信息,请在下面提供。


1条回答
  • #blade配置
    blade:
      #关闭数据权限
      data-scope:
        enabled: false


    0 讨论(0)
提交回复