String sql="";
if(type==0){//产品审核
sql=" select oe.*,sc.commodity_name,oa.admin_name from os_examine oe LEFT JOIN shop_commodity sc ON oe.odd_id=sc.id "
+" LEFT JOIN user u on sc.shop_id=u.shop_id LEFT JOIN os_admin oa on oe.admin_id=oa.id where type=0 ";
if(oddId>0){
sql+=" and u.id="+oddId;
}
}
if(type==1){//采购审核
sql=" select oe.*,sp.purchase_title,oa.admin_name from os_examine oe LEFT JOIN shop_purchase sp on oe.odd_id=sp.id "
+" LEFT JOIN os_admin oa on oe.admin_id=oa.id where oe.type=1 ";
if(oddId>0){
sql+=" and sp.purchase_facture="+oddId;
}
}
if(type==2){//用户审核
sql=" select oe.*,ue.user_name,oa.admin_name from os_examine oe LEFT JOIN user ue on oe.odd_id=ue.id "
+" LEFT JOIN os_admin oa on oe.admin_id=oa.id where oe.type=2 ";
if(oddId>0){
sql+=" and ue.id="+oddId;
}
}
if(type==3){//申请参与会展审核
}
Sql sqly=Sqls.create(sql);
sqly.setCallback(new SqlCallback() {
@Override
public Object invoke(Connection con, ResultSet rs, Sql sq) throws SQLException {
// TODO Auto-generated method stub
List<Map<String,Object>> lsit=new LinkedList<Map<String,Object>>();
ResultSetMetaData m=rs.getMetaData();
int count=m.getColumnCount();
for(int i=1;i<=count;i++){
Map<String,Object> map=new HashMap<String, Object>();
map.put(m.getColumnName(i), rs.getObject(i));
lsit.add(map);
}
return lsit;
}
});
dao.execute(sqly);
我想得到回调函数里的list,但是没有实体类,怎么获取数据啊