一个参数可以忽略
@Select({"select name from tt_sx where id = #{id}})
String getNameById(int id);
多个参数需要加@Param
@Select({"select name from tt_sx where id = #{id} and status = #{status}})
String getNameByIdAndStatus(@Param("id") int id, @Param("status") String status);