Home  >  Q&A  >  body text

java - MyBatis动态SQL实现ORDER BY和LIMIT的控制?

MyBatis如果想用动态SQL实现ORDER BY和LIMIT语句的运行与否,怎么办?

大家讲道理大家讲道理2744 days ago940

reply all(1)I'll reply

  • 黄舟

    黄舟2017-04-18 10:50:56

    I’m not sure about your needs, but you can try adding the @SelectProvider annotation to the mapper interface. By customizing the sql, you can process the sql differently based on the parameters. Similarly, there are @UpdateProvider, @ DeleteProvider, @InsertProvider these annotations.

    reply
    0
  • Cancelreply