Skip to content

Instantly share code, notes, and snippets.

@vivisidea
Created May 14, 2012 03:16
Show Gist options
  • Save vivisidea/2691570 to your computer and use it in GitHub Desktop.
Save vivisidea/2691570 to your computer and use it in GitHub Desktop.
queryForMap的用法
@SuppressWarnings("unchecked")
@Override
public Map<Integer, Integer> queryCountGroupByTargetId() {
Map<Integer, Integer> map = (Map<Integer, Integer>)getSqlMapClientTemplate().queryForMap(
"Keyword.queryCountGroupByTargetId", null, "TargetId", "Count"); // queryForMap就是指定哪一列为key,哪一列为value,即可
return map;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment