<?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="edu.whut.infrastructure.dao.ISkuDao">

    <resultMap id="dataMap" type="edu.whut.infrastructure.dao.po.Sku">
        <id column="id" property="id"/>
        <result column="source" property="source"/>
        <result column="channel" property="channel"/>
        <result column="goods_id" property="goodsId"/>
        <result column="goods_name" property="goodsName"/>
        <result column="original_price" property="originalPrice"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
    </resultMap>

    <select id="querySkuByGoodsId" parameterType="java.lang.String" resultMap="dataMap">
        select source, channel, goods_id, goods_name, original_price
        from sku
        where goods_id = #{goodsId}
    </select>

</mapper>
