<?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.kxs.product.biz.mapper.KxsShopGoodsMapper">

    <resultMap type="com.kxs.product.api.model.KxsShopGoods" id="KxsShopGoodsMap">
        <result column="id" property="id" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
        <result column="del_flag" property="delFlag" />
        <result column="version" property="version" />
        <result column="pic_url" property="picUrl" />
        <result column="goods_name" property="goodsName" />
        <result column="price" property="price" />
        <result column="subtitle" property="subtitle" />
        <result column="details" property="details" />
        <result column="status" property="status" />
        <result column="col_id" property="colId" />
        <result column="limit_count" property="limitCount" />
        <result column="start_by_count" property="startByCount" />
        <result column="goods_type" property="goodsType" />
        <result column="up_time" property="upTime" />
        <result column="down_time" property="downTime" />
        <result column="sku_json" property="skuJson" />

    </resultMap>

    <select id="getByPage" resultType="com.kxs.product.api.vo.kxsapp.shop.ShopGoodsListVO">
        select * from kxs_shop_goods a
        <where>
            a.del_flag = 0
            and a.status = 1
            <if test="colId != null">
                a.col_id like concat('%' #{colId} '%')
            </if>
        </where>
    </select>

</mapper>
