标签:
// 简单sql
String sql = " select w.id,w.title,w.menucode,w.pid,w.pname,w.createdate,w.content,w.status,w.imagename " +
" from mss_worknewcontent w " +
" where 1=1 and w.status = 1 and w.menucode = ‘fengguang‘ and w.pid = ‘"+id+"‘ ";
// jdbcTemplate模板查询得到map list
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
//在把list封装成某对象的形式,这样的操作就是避免了实体类在与操作表那些复杂关系
标签:
原文地址:http://my.oschina.net/u/2467394/blog/522434