public static FieldMatcher make(String actived, String locked, boolean ignoreNull,
boolean ignoreZero, boolean ignoreDate,
boolean ignoreId,
boolean ignoreName,
boolean ignorePk)
代码:
FieldMatcher fm = FieldMatcher.make("^id|order_id|status|time_end|create_time|update_time$",//actived
//"^id|order_id|status|product_id|amount|open_id|time_end|create_time|update_time$"
null,//locked
false,//ignoreNull
false,//ignoreZero
false,//ignoreDate
false,//ignoreId
false,//ignoreName
false //ignorePk
);
FieldFilter fff = FieldFilter.create(Order.class, fm);
List<Order> orders4 = Daos.ext(dao, fff).query(Order.class, Cnd.where("1", "=", 1)
// .desc("id"),
,dao.createPager(1, 10)
);
日志:
2018-04-15 13:05:11,365 [http-nio-8080-exec-5] DEBUG org.nutz.dao.impl.sql.run.NutDaoExecutor - SELECT id,status,amount FROM t_order WHERE 1=? LIMIT 0, 10
| 1 |
|---|
| 1 |
For example:> "SELECT id,status,amount FROM t_order WHERE 1=1 LIMIT 0, 10 "
2018-04-15 13:05:11,388 [http-nio-8080-exec-5] DEBUG com.hefupb.hefuwechatadmin.common.mvc.LogTimeProcessor - [ GET]URI=/admin/test/test6 71ms