上地址:
https://gitee.com/fluent-mybatis/fluent-mybatis
这是个ORM 框架
@Repository
public class StudentScoreDaoImpl extends StudentScoreBaseDao implements StudentScoreDao {
@Override
public List<ScoreStatistics> statistics(int fromSchoolTerm, int endSchoolTerm, String[] subjects) {
return super.listPoJos(ScoreStatistics.class, super.query()
.select.schoolTerm().subject()
.count("count")
.min.score("min_score")
.max.score("max_score")
.avg.score("avg_score")
.end()
.where.isDeleted().isFalse()
.and.schoolTerm().between(fromSchoolTerm, endSchoolTerm)
.and.subject().in(subjects)
.end()
.groupBy.schoolTerm().subject().end()
.orderBy.schoolTerm().asc().subject().asc().end()
);
}
}
这个与 nutz dao 比起来更直观
如果 nutz dao 也能完成这种类型的 预编译
我想对于推广会更有好处。