sqxiayaoshun opened a new issue #6854:
URL: https://github.com/apache/dolphinscheduler/issues/6854


   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   There is an error in ResourceMapper.xml (line:66)
   
   This will cause authorized users not to read the file list;
   
   
   
   
   
   
   ### What you expected to happen
   
   
   
   An unnecessary ”and“ was written
   
   logs:
   
   Caused by: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: 
Error: Method queryTotal execution error of sql :
    SELECT COUNT(1) FROM ( select
   
          d.id, d.alias, d.file_name, d.description, d.user_id, d.type, d.size, 
d.create_time, d.update_time,
          d.pid, d.full_name, d.is_directory
   
           from t_ds_resources d
           where d.type=? and d.pid=?
   
               and (
   
                   and d.id in
                    (
                       ?
                    ,
                       ?
                    ) or
   
               d.user_id=? )
   
   
           order by d.update_time desc ) TOTAL
   
           at 
com.baomidou.mybatisplus.core.toolkit.ExceptionUtils.mpe(ExceptionUtils.java:39)
           at 
com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor.queryTotal(PaginationInterceptor.java:248)
           at 
com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor.intercept(PaginationInterceptor.java:202)
           at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)
           at com.sun.proxy.$Proxy182.prepare(Unknown Source)
           at 
com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.prepareStatement(MybatisSimpleExecutor.java:94)
           at 
com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doQuery(MybatisSimpleExecutor.java:66)
           at 
org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)
           at 
org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
           at 
org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:136)
           at 
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
           ... 110 common frames omitted
   
   ### How to reproduce
   
   Use the super/root/admin account to create a folder and file, and then 
authorize it to ordinary users. When ordinary users view it, there will be no 
data, and the above error will appear in the log file.
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   2.0.0-alpha
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to