Sql sql =null;
Result result = Result.ok();
sql= Sqls.fetchEntity("CALL iteminfo(@itemClass,@size)");
sql.params().set("itemClass", null); //设置入参
sql.params().set("size",1);
if(!Strings.isBlank(itemClass)){
sql.params().set("itemClass", Integer.parseInt(itemClass)); //设置入参
}
if(!Strings.isBlank(fynum)){
sql.params().set("size",Integer.parseInt(fynum));
}
sql.setEntity(dao.getEntity(ItemInfo.class));
sql.setCallback(Sqls.callback.entities());
dao.execute(sql);
List list = sql.getList(ItemInfo.class);
添加回复
请先登陆