我的mapper里编了一个这个sql,但是我发现执行的时候总是会跟一个order by createTime desc,但是没有指定哪个表,总是报错,也不知道是哪里配置的。我自己在sql中的if里加
order by a.createTime desc 也不好使
select
a.*,
b.*
FROM
pfzf_organization a
LEFT JOIN organizationType b ON a.organizationTypeId = b.organizationTypeId
<where>
and 1 = 1
<if test="organizationTypeId!=null and organizationTypeId!=''">
and organizationTypeId =#{organizationTypeId}
</if>
</where>
select * from ( select tmp_page.*, rownum row_id from ( SELECT a.*, b.* FROM pfzf_organization a LEFT JOIN organizationType b ON a.organizationTypeId = b.organizationTypeId WHERE 1 = 1 order by createTime desc ) tmp_page where rownum <= ? ) where row_id > ?
去哪能改掉?