@Select({"<script>", "sql语句"+ "</script> "})回车会自动拼接
代码⬇️
@Select({"<script>",
"SELECT id,username,client_id,password,mobile,email,account_non_locked from bhcz_user" +
"<where>\n" +
" <if test=\"bhczUser.username!='' and bhczUser.username!=null\">\n" +
" AND username LIKE CONCAT('%',#{bhczUser.username},'%')\n" +
" </if>\n" +
" <if test=\"bhczUser.mobile!='' and bhczUser.mobile!=null\">\n" +
" AND mobile LIKE CONCAT('%',#{bhczUser.mobile},'%')\n" +
" </if>\n" +
" </where>"+
" </script> "})