<?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.younike.system.mapper.CategoryMapper">

<!--    首页服务数据-->
    <select id="selectCategoryByGoodsId"   resultMap="CategoryResult">
        SELECT
            c.parent_id,
            c.category_id
        FROM
            goods g
                LEFT JOIN category c ON c.category_id = g.cate_id
        WHERE
            g.goods_id = #{goodsId}
    </select>

</mapper>
