在2.9.0.RELEASE版本里的sql到4.3.0.RELEASE版本里之后执行报错

Blade 未结 1 49

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

1. 在2.9.0.RELEASE版本里的分页sql到4.3.0.RELEASE版本里之后执行报错,在navicat和2.9.0.RELEASE里面执行没有任何问题


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

我把sql里面的所有条件都注释了也没用

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

上夜班4.3.0.RELEASE,java。win7

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

org.springblade.core.log.exception.ServiceException: 

### Error querying database.  Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL: select

        a.id,

        a.name,

        a.address,

        a.receipt_status,

        a.region_code,

        a.state,

        a.longitude,

        a.latitude,

        a.state,

        a.is_update,

        a.last_consumable_time,

        a.last_inspect_time,

        d.name_path AS region_code_name,

        IFNULL(a.is_inspect,0) inspect_count,

        IFNULL(a.is_consumable,0) as consumable_count,

        IFNULL(a.is_expansion,0) as expansion_count

         

        from

        (

        SELECT

        a.id

        FROM

        tb_base_ent a


        left JOIN (

        SELECT

        count(*) as inspect_count,

        ent_id

        FROM

        tb_inspect

        WHERE

        is_deleted = 0 and status=1

        

         

        

         

         

            AND (

              

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             

            )

         

        GROUP BY ent_id

        ) b ON a.id = b.ent_id


        WHERE

        is_deleted = 0

         


         

            AND FIND_IN_SET(?,a.receipt_status)

         

         

            AND (

              

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             

            )

         


         


         


         


         



        

         

        

         


         

         

        ) c join tb_base_ent a on c.id=a.id

        LEFT JOIN ( SELECT region_code, city_name, name_path FROM tb_base_region WHERE is_deleted = 0 ) d ON

        a.region_code = d.region_code

         

                ORDER BY a.create_time desc

             

         

            limit ?,?

### Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL: select

        a.id,

        a.name,

        a.address,

        a.receipt_status,

        a.region_code,

        a.state,

        a.longitude,

        a.latitude,

        a.state,

        a.is_update,

        a.last_consumable_time,

        a.last_inspect_time,

        d.name_path AS region_code_name,

        IFNULL(a.is_inspect,0) inspect_count,

        IFNULL(a.is_consumable,0) as consumable_count,

        IFNULL(a.is_expansion,0) as expansion_count

         

        from

        (

        SELECT

        a.id

        FROM

        tb_base_ent a


        left JOIN (

        SELECT

        count(*) as inspect_count,

        ent_id

        FROM

        tb_inspect

        WHERE

        is_deleted = 0 and status=1

        

         

        

         

         

            AND (

              

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             

            )

         

        GROUP BY ent_id

        ) b ON a.id = b.ent_id


        WHERE

        is_deleted = 0

         


         

            AND FIND_IN_SET(?,a.receipt_status)

         

         

            AND (

              

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             OR 

                region_code LIKE CONCAT(?, '%')

             

            )

         


         


         


         


         



        

         

        

         


         

         

        ) c join tb_base_ent a on c.id=a.id

        LEFT JOIN ( SELECT region_code, city_name, name_path FROM tb_base_region WHERE is_deleted = 0 ) d ON

        a.region_code = d.region_code

         

                ORDER BY a.create_time desc

             

         

            limit ?,?

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

1条回答
  • 麻烦在最新的4.5.0.RELEASE,bladex-boot工程的notice模块增加一个可重现的代码,然后把加了重现逻辑的完整代码发邮件给我们 我们安排排查 bladejava@qq.com 。

    如果新建了表,请把建标sql+内容也一并邮件提供。

    0 讨论(0)
代码语言
提交回复