商品分类修改完善

This commit is contained in:
zhh
2018-05-24 11:17:26 +08:00
parent 424cbe0df5
commit 8e48c839ff
7 changed files with 110 additions and 15 deletions

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.macro.mall.dao.PmsProductAttributeCategoryDao">
<resultMap id="getListWithAttrMap" type="com.macro.mall.dto.PmsProductAttributeCategoryItem" extends="com.macro.mall.mapper.PmsProductAttributeCategoryMapper.BaseResultMap">
<collection property="productAttributeList" columnPrefix="attr_" resultMap="com.macro.mall.mapper.PmsProductAttributeMapper.BaseResultMap">
</collection>
</resultMap>
<select id="getListWithAttr" resultMap="getListWithAttrMap">
SELECT
pac.id,
pac.name,
pa.id attr_id,
pa.name attr_name
FROM
pms_product_attribute_category pac
LEFT JOIN pms_product_attribute pa ON pac.id = pa.product_attribute_category_id
AND pa.type=1;
</select>
</mapper>