IBATIS返回map

程序代码:
public Map<String,Object> queryShareUser(Map<String, Object> map) throws Exception {
  return this.sqlMapClient.queryForMap("User.queryShareUser",map,"lostUserId","profitUserName");
 }
xml文件:
<resultMap id="sharemap" class="java.util.HashMap">
     <result property="lostUserId" column="lostUserId" javaType="java.lang.String" />
     <result property="profitUserName" column="profitUserName" javaType="java.lang.String" />
</resultMap>
<select id="User.queryShareUser"  parameterClass="map" resultMap="sharemap">
	SELECT r.lost_user_id lostUserId,GROUP_CONCAT(u.userName ) AS profitUserName 
	FROM TB_BACK_USER_ADMIN_RELATION r LEFT JOIN TB_BACK_USER u ON  r.profit_user_id=u.id
	WHERE lost_user_id IN ($userIds$) GROUP BY lost_user_id
</select>



   

你可能感兴趣的:(IBATIS返回map)