|
@@ -70,6 +70,73 @@
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
+ <resultMap type="com.kmall.admin.entity.GoodsEntity" id="goodsMapNew">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="merchSn" column="merch_sn"/>
|
|
|
+ <!--<result property="categoryId" column="category_id"/>-->
|
|
|
+ <result property="goodsSn" column="goods_sn"/>
|
|
|
+ <result property="name" column="name"/>
|
|
|
+ <!--<result property="brandId" column="brand_id"/>-->
|
|
|
+ <!--<result property="freightId" column="freight_id"/>-->
|
|
|
+ <result property="brand" column="brand"/>
|
|
|
+ <result property="goodsNumber" column="goods_number"/>
|
|
|
+ <result property="keywords" column="keywords"/>
|
|
|
+ <result property="goodsBrief" column="goods_brief"/>
|
|
|
+ <result property="goodsDesc" column="goods_desc"/>
|
|
|
+ <result property="isOnSale" column="is_on_sale"/>
|
|
|
+ <result property="addTime" column="add_time"/>
|
|
|
+ <result property="sortOrder" column="sort_order"/>
|
|
|
+ <result property="isDelete" column="is_delete"/>
|
|
|
+ <!--<result property="attributeCategory" column="attribute_category"/>-->
|
|
|
+ <result property="counterPrice" column="counter_price"/>
|
|
|
+ <result property="extraPrice" column="extra_price"/>
|
|
|
+ <result property="isNew" column="is_new"/>
|
|
|
+ <result property="goodsUnit" column="goods_unit"/>
|
|
|
+ <result property="primaryPicUrl" column="primary_pic_url"/>
|
|
|
+ <result property="listPicUrl" column="list_pic_url"/>
|
|
|
+ <!--<result property="retailPrice" column="retail_price"/>-->
|
|
|
+<!-- <result property="sellVolume" column="sell_volume"/>-->
|
|
|
+ <result property="primaryProductId" column="primary_product_id"/>
|
|
|
+ <result property="unitPrice" column="unit_price"/>
|
|
|
+ <result property="promotionDesc" column="promotion_desc"/>
|
|
|
+ <result property="promotionTag" column="promotion_tag"/>
|
|
|
+ <result property="appExclusivePrice" column="app_exclusive_price"/>
|
|
|
+ <result property="isAppExclusive" column="is_app_exclusive"/>
|
|
|
+ <result property="isLimited" column="is_limited"/>
|
|
|
+ <result property="isHot" column="is_hot"/>
|
|
|
+ <!--<result property="marketPrice" column="market_price"/>-->
|
|
|
+ <result property="goodsType" column="goodsType"/>
|
|
|
+ <result property="sku" column="sku"/>
|
|
|
+ <result property="goodsBizType" column="goods_biz_type"/>
|
|
|
+ <result column="creater_sn" property="createrSn" jdbcType="VARCHAR"/>
|
|
|
+ <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="moder_sn" property="moderSn" jdbcType="VARCHAR"/>
|
|
|
+ <result column="mod_time" property="modTime" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="tstm" property="tstm" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="prodBarcode" column="prod_barcode"/>
|
|
|
+ <result property="unitCode" column="unit_code"/>
|
|
|
+ <result property="goodsDesc" column="goods_desc"/>
|
|
|
+ <result property="cusGoodsCode" column="cus_goods_code"/>
|
|
|
+ <result property="ciqProdModel" column="ciq_prod_model"/>
|
|
|
+ <result property="oriCntCode" column="ori_cnt_code"/>
|
|
|
+ <result property="cusDeclEle" column="cus_decl_ele"/>
|
|
|
+ <result property="cusRecCode" column="cus_rec_code"/>
|
|
|
+ <result property="supplierId" column="supplier_id"/>
|
|
|
+<!-- <result property="stockNum" column="stock_num"/>-->
|
|
|
+ <result property="storeName" column="store_name"/>
|
|
|
+ <result property="productId" column="productId"/>
|
|
|
+ <result property="storeId" column="storeId"/>
|
|
|
+ <result column="merch_name" property="merchName"/>
|
|
|
+ <result column="storeMarketPrice" property="storeMarketPrice"/>
|
|
|
+ <result column="storeRetailPrice" property="storeRetailPrice"/>
|
|
|
+ <result column="third_party_merch_code" property="thirdPartyMerchCode"/>
|
|
|
+ <result column="isStockShare" property="isStockShare"/>
|
|
|
+ <result column="gross_weight" property="grossWeight"/>
|
|
|
+ <result column="net_weight" property="netWeight"/>
|
|
|
+ <result property="isGoodsShareStock" column="is_goods_share_stock"/>
|
|
|
+
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
<select id="queryObject" resultType="com.kmall.admin.entity.GoodsEntity">
|
|
|
SELECT
|
|
|
a.*, CASE
|
|
@@ -136,14 +203,12 @@
|
|
|
where a.id = #{id} and psr1.store_id = #{storeId}
|
|
|
</select>
|
|
|
|
|
|
- <select id="queryGoodsByGoodsSnAndStoreId" resultMap="goodsMap">
|
|
|
+ <select id="queryGoodsByGoodsSnAndStoreId" resultMap="goodsMapNew">
|
|
|
select
|
|
|
a.sku,
|
|
|
a.id,
|
|
|
- psr1.category_id,
|
|
|
a.goods_sn,
|
|
|
a.name,
|
|
|
- psr1.brand_id,
|
|
|
a.goods_number,
|
|
|
a.keywords,
|
|
|
a.goods_brief,
|
|
@@ -151,15 +216,12 @@
|
|
|
a.add_time,
|
|
|
a.sort_order,
|
|
|
a.is_delete,
|
|
|
- psr1.attribute_category,
|
|
|
a.counter_price,
|
|
|
a.extra_price,
|
|
|
a.is_new,
|
|
|
a.goods_unit,
|
|
|
a.primary_pic_url,
|
|
|
a.list_pic_url,
|
|
|
- psr1.retail_price,
|
|
|
- psr1.sell_volume,
|
|
|
a.primary_product_id,
|
|
|
a.unit_price,
|
|
|
a.promotion_desc,
|
|
@@ -170,9 +232,6 @@
|
|
|
a.is_hot,
|
|
|
a.merch_sn,
|
|
|
m.merch_name,
|
|
|
- psr1.store_id,
|
|
|
- psr1.market_price,
|
|
|
- psr1.stock_num,
|
|
|
a.goods_desc,a.goods_biz_type,a.goods_rate,
|
|
|
a.sell_volume goods_sell_volume,
|
|
|
mb.third_party_merch_code,
|
|
@@ -181,11 +240,9 @@
|
|
|
mb2.third_party_merch_code 'supplierThirdMerchCode',
|
|
|
mb2.is_stock_share 'isStockShareBySuppler'
|
|
|
from mall_goods a left join mall_merch m on a.merch_sn = m.merch_sn
|
|
|
- LEFT JOIN mall_product_store_rela psr1 ON a.id = psr1.goods_id and a.merch_sn = psr1.merch_sn
|
|
|
- LEFT JOIN mall_store s ON s.id = psr1.store_id
|
|
|
- LEFT JOIN third_merchant_biz mb on s.third_party_merch_code = mb.third_party_merch_code
|
|
|
+ LEFT JOIN third_merchant_biz mb on mb.third_party_merch_code = a.third_party_merch_code
|
|
|
LEFT JOIN third_merchant_biz mb2 ON a.third_party_merch_code = mb2.third_party_merch_code
|
|
|
- where a.goods_sn = #{goodsSn} and psr1.store_id = #{storeId}
|
|
|
+ where a.goods_sn = #{goodsSn}
|
|
|
</select>
|
|
|
|
|
|
<select id="queryObjectByProdBarcodeAndBizType" resultType="com.kmall.admin.entity.GoodsEntity">
|