sqlprovider是否可以重载
@InsertProvider(type = MovieCatSqlProvider.class)
int insertMovieCat(String movieId,String catId);
@InsertProvider(type = MovieCatSqlProvider.class)
int insertMovieCat(Movie movie,CatTag catTag);
public String insertMovieCat(String movieId,String catId) {
return new SQL(){{
INSERT_INTO("movie_cat");
VALUES("movie_id", "#{movieId}");
VALUES("cat_id", "#{catId}");
}}.toString();
}
public String insertMovieCat(Movie movie,CatTag catTag) {
return new SQL(){{
INSERT_INTO("movie_cat");
VALUES("movie_id", "#{movie.movieId}");
VALUES("cat_id", "#{catTag.catId}");
}}.toString();
}
例外是 无法解析提供程序方法,因为在SqlProvider'top.curryguy.ossjava.dao.MovieCatDao $ MovieCatSqlProvider'中发现多个'insertMovieCat'。
我想重载方法