2019-02-22 08:31
@野猪佩琪 "Jtrade_no这个字段处理不了"处理不了什么问题?想处理成什么结果? 这个jfinal貌似没半毛钱关系了,看你要输出什么结果,仅仅是数据处理罢了
2019-02-13 11:58
@Test
public void testKv(){
String json ="{\"order_uid\": \"xxxxxx@qq.com\", \"goods_name\": \"\\u4e2d\\u6587\\u5546\\u54c1\", \"money\": \"1.0\", \"channel\": \"alipaybank\", \"trade_no\": \"16#\\u5174\\u4e1a\\u94f6\\u884c#124#2019\\u5e7401\\u670830\\u65e518:13#1.0#9288.90\", \"remark\": \"\", \"order_id\": \"1548842011488_ANFvYz\", \"key\": \"2f0b7500b658e190ff0504219c082c08\"}";
Kv kv = FastJson.getJson().parse(json, Kv.class);
System.out.println(kv.getStr("order_uid"));
System.out.println(kv.getStr("goods_name"));
}
2018-12-21 15:22
@Sohnny 调用错误
方式1:
sql模板写法:
#sql('find')
select a,b,c from user where a=#para(0) and b=#para(1)
#end
业务层写法:
SqlPara sp = Db.getSqlPara("user.find", aValue,bValue);
.....Db.use('xxxxx').paginate(pageNumber, pageSize, sp);
方式2:
sql 模板写法:
#sql('find')
select a,b,c from user where a=#(aValue) and b=#(bValue)
#end
业务层写法:
....
Kv kv = Kv.by("aVlue", "条件a").set("vValue", "条件b");
......
public Page paginate(int pageNumber, int pageSize, Kv kv) {
SqlPara sp = Db.getSqlPara("user.find", kv);
return Db.paginate(pageNumber, pageSize, sp);
}