mybatis 之resultType="Map"
阿新 • • 發佈:2017-08-03
tsl for product common tty get myba code rod
Map map = new HashMap(); map.put("productTypeID", productTypeId); List<HashMap> productAttributeList = productsListService.getAttrByTypeID(map);
public List<HashMap> getAttrByTypeID(Map map) { return commonDao.queryForList("ProductAttribute.getAttrByTypeID", map); }
<select id="getAttrByTypeID" parameterType="Map" resultType="Map"> select distinct a.attribute_id as ATTR_GROUP_ID,a.attribute_name as ATTR_GROUP_NAME,‘‘ IS_DISPLAY from PRODUCT_ATTRIBUTE a ,ATTR_GROUP_DEF c,ATTR_GROUP_TYPE_DEF k where k.attr_group_id= c.attr_group_idand c.attribute_id = a.attribute_id and k.product_type_id = #{productTypeID} </select>
mybatis 之resultType="Map"