普通sql的查询方法(jdbc),主要返回一个list<map>:
String sql = "select fund_type,sum(cash_withdrawal) money from cashflow where uid = ? and cash_withdrawal_status = 0 GROUP BY fund_type";
List<Object> param = new ArrayList<Object>();
param.add(cashflow.getUid());
List<Map<String,Object>> list = cashflowService.findForJdbc(sql, param.toArray());
hql:
StringBuffer hql = new StringBuffer("");
List<Object> param = new ArrayList<Object>();
hql.append("from DepositFlowEntity where 1=1 and withdrawalsReturnId=? and refReturnType = ? order by returnTime desc");
param.add(cashflow.getCashFlowId());
param.add(HuiDianBaoConstants.FROZEN_CASH);
List<DepositFlowEntity> depositFlowList = super.findHql(hql.toString(), param.toArray());