#sql("select")
select fid, ?
from t_person
where fname = ?
#end String sql = Db.getSql("select");
List<Record> records = Db.find(sql, "FDate", "张三");或者写样写
#sql("select")
select ID, FNumber
#for(x : cols)
, #para(x.value)
#end
from IcStockBill
#for(y : cond)
#(for.first ? "where" : "and") #(y.key) #para(y.value)
#end
#endKv col = Kv.by("f1", "FNote").set("f2", "FType");
Kv cond = Kv.by("ID=", 321);
SqlPara sp = Db.getSqlPara("select", Kv.by("cols", col), Kv.by("cond", cond));
List<Record> records = Db.find(sp);这样写是无法得到字段名,也无法加载条件。
如果把#for(x : cols)段去掉,条件则可以加载
应该怎么写?
项目:JFinal
为啥不用 model.find(sqlPara) 方法