<?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.GoodsMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="goodsResultMap" type="org.springblade.modules.shopping.entity.Goods">
        <id column="id" property="id"/>
        <result column="goods_name" property="goodsName"/>
        <result column="goods_label" property="goodsLabel"/>
        <result column="goods_img" property="goodsImg"/>
        <result column="category_id" property="categoryId"/>
        <result column="category_name" property="categoryName"/>
        <result column="brand_id" property="brandId"/>
        <result column="is_sale" property="isSale"/>
        <result column="is_recom" property="isRecom"/>
        <result column="is_hot" property="isHot"/>
        <result column="is_new" property="isNew"/>
        <result column="goods_price" property="goodsPrice"/>
        <result column="market_price" property="marketPrice"/>
        <result column="cost_price" property="costPrice"/>
        <result column="ticket_num" property="ticketNum"/>
        <result column="warn_stock" property="warnStock"/>
        <result column="goods_stock" property="goodsStock"/>
        <result column="sales_volume" property="salesVolume"/>
        <result column="goods_type" property="goodsType"/>
        <result column="is_free_shipping" property="isFreeShipping"/>
        <result column="free_price" property="freePrice"/>
        <result column="gallery" property="gallery"/>
        <result column="text_img" property="textImg"/>
        <result column="is_spec" property="isSpec"/>
        <result column="goods_video" property="goodsVideo"/>
        <result column="goods_desc" property="goodsDesc"/>
        <result column="goods_status" property="goodsStatus"/>
        <result column="sort" property="sort"/>
        <result column="is_deleted" property="isDeleted"/>
        <result column="sale_time" property="saleTime"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
    </resultMap>


    <select id="selectGoodsPage" resultMap="goodsResultMap">
        select * from t_goods where is_deleted = 0
    </select>

</mapper>
