@Select(
{"<script>",
"SELECT * FROM user_task",
"WHERE 1=1",
"<if test='userId!=null and userId!=0'>",
"AND user_id = #{userId}",
"</if>",
"order by id desc limit #{currPotion}, #{pageSize}",
"</script>"}
)
List<UserTask> findAll(@Param("userId") long userId,@Param("currPotion") long currPotion, @Param("pageSize") long pageSize);
mybatis plus使用注解编写sql语句
最新推荐文章于 2024-04-23 10:28:55 发布