@Select({ "<script>" , "SELECT COUNT(*) FROM category", "<if test=‘query != null and query != \" \" ‘>", "where cat_name like ‘%${query}%‘", "</if>", "</script>" }) Integer getCount(@Param("query") String query);
原文:https://www.cnblogs.com/qianxiaoPro/p/14957339.html