FieldFilter ff = FieldFilter.create(CarModelStock.class, "^carSeriesId|carColor$");
//输出sql SELECT carSeriesId,carColor FROM carmodelStock WHERE yearCreate='2017' GROUP BY carSeries,carColor
// FieldFilter ff = FieldFilter.create(CarModelStock.class, "^carSeriesId|carColor|count(1)$"); //这里只会把count(1)当成下一个字段进行输出 怎么解决
//输出sql SELECT carSeriesId,carColor,carColorPic FROM carmodelStock WHERE yearCreate='2017' GROUP BY carSeries,carColor
List<CarModelStock> cmsList = Daos.ext(dao, ff).query(CarModelStock.class,Cnd.where("yearCreate","=","2017").groupBy("carSeries,carColor"));
7 回复
我想要的是 SELECT carSeriesId,carColor,count(1) FROM carmodelStock WHERE yearCreate='2017' GROUP BY carSeries,carColor
试试
List<Record> cmsList = dao.query("carmodelStock", Cnd.where("yearCreate","=","2017").groupBy("carSeries,carColor"), null, "carSeriesId,carColor,count(1)");
为啥不升级?
来自美丽的 NutzCN
添加回复
请先登陆