<?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="org.springblade.modules.shopping.mapper.GoodsSpecsMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="goodsSpecsResultMap" type="org.springblade.modules.shopping.entity.GoodsSpecs">
        <id column="id" property="id"/>
        <result column="goods_id" property="goodsId"/>
        <result column="spec_ids" property="specIds"/>
        <result column="market_price" property="marketPrice"/>
        <result column="spec_price" property="specPrice"/>
        <result column="spec_stock" property="specStock"/>
        <result column="warn_stock" property="warnStock"/>
        <result column="sale_num" property="saleNum"/>
        <result column="is_default" property="isDefault"/>
        <result column="cost_price" property="costPrice"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>


    <select id="selectGoodsSpecsPage" resultMap="goodsSpecsResultMap">
        select * from t_goods_specs where is_deleted = 0
    </select>

</mapper>
