sql resultType="java.util.HashMap"

結果集爲hashMap時的sqljava

mapper   List<HashMap> sel*();sql

<select id="selGoodsCateTotaNum" resultType="java.util.HashMap" parameterType="com.nxmall.nxds.goods.dao.model.Goods">
  SELECT SUM(b.curr_stock) as tNum , a.category_id
   FROM nxds_goods  a LEFT JOIN `nxds_goods_spec`  b ON a.id = b.goods_id
  WHERE  a.is_enabled = '1'  AND a.system_id='1'  GROUP BY a.category_id
</select>
相關文章
相關標籤/搜索