<?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.heketai.website.mapper.ProductCategoryMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.heketai.website.entity.ProductCategory">
        <id column="id" property="id"/>
        <result column="name_ch" property="nameCh"/>
        <result column="name_en" property="nameEn"/>
        <result column="parent_id" property="parentId"/>
        <result column="img" property="img"/>
        <result column="is_summary" property="isSummary"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
        <result column="desc_ch" property="descCh"/>
        <result column="desc_en" property="descEn"/>
        <result column="feature_ch" property="featureCh"/>
        <result column="feature_en" property="featureEn"/>
        <result column="application_en" property="applicationEn"/>
        <result column="application_ch" property="applicationCh"/>
        <result column="sort" property="sort"/>
    </resultMap>



    <resultMap id="ProductCategoryVOMap" type="com.heketai.website.common.vo.ProductCategoryVO">
        <id column="id" property="id"/>
        <result column="name_ch" property="nameCh"/>
        <result column="name_en" property="nameEn"/>
    </resultMap>
    <select id="findById" resultMap="ProductCategoryVOMap">
        select id
             , name_ch
             , name_en
        from product_category
        where id = #{parentId}
    </select>


</mapper>
