<?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="shopServiceDaoImpl">
|
|
<!-- 保存商品信息 add by wuxw 2018-07-03 -->
|
<insert id="saveBusinessShopInfo" parameterType="Map">
|
insert into business_shop(shop_id,b_id,catalog_id,store_id,name,hot_buy,sale_price,open_shop_count,shop_count,start_date,end_date,month,operate)
|
values(#{shopId},#{bId},#{catalogId},#{storeId},#{name},#{hotBuy},#{salePrice},#{openShopCount},#{shopCount},#{startDate},#{endDate},#{month},#{operate})
|
</insert>
|
<!-- 保存商品属性信息 add by wuxw 2018-07-03 -->
|
<insert id="saveBusinessShopAttr" parameterType="Map">
|
insert into business_shop_attr(b_id,attr_id,shop_id,spec_cd,value,month,operate)
|
values(#{bId},#{attrId},#{shopId},#{specCd},#{value},#{month},#{operate})
|
</insert>
|
|
<insert id="saveBusinessShopAttrParam" parameterType="Map">
|
insert into business_shop_attr_param(attr_param_id,b_id,shop_id,spec_cd,param,month,operate)
|
values(#{attrParamId},#{bId},#{shopId},#{specCd},#{param},#{month},#{operate})
|
</insert>
|
|
<!-- 保存商品照片信息 add by wuxw 2018-07-03 -->
|
<insert id="saveBusinessShopPhoto" parameterType="Map">
|
insert into business_shop_photo(shop_photo_id,b_id,shop_id,shop_photo_type_cd,photo,month,operate)
|
values(#{shopPhotoId},#{bId},#{shopId},#{shopPhotoTypeCd},#{photo},#{month},#{operate})
|
</insert>
|
<!-- 保存商品优惠信息 add by wuxw 2018-07-03 -->
|
<insert id="saveBusinessShopPreferential" parameterType="Map">
|
insert into business_shop_preferential(shop_preferential_id,b_id,shop_id,original_price,discount_rate,show_original_price,preferential_start_date,preferential_end_date,month,operate)
|
values(#{shopPreferentialId},#{bId},#{shopId},#{originalPrice},#{discountRate},#{showOriginalPrice},#{preferentialStartDate},#{preferentialEndDate},#{month},#{operate})
|
</insert>
|
|
<insert id="saveBusinessShopDesc" parameterType="Map">
|
insert into business_shop_desc(shop_desc_id,shop_id,b_id,shop_describe,month,operate)
|
values(#{shopDescId},#{shopId},#{bId},#{shopDescribe},#{month},#{operate})
|
</insert>
|
<!-- 商品目录 add by wuxw 2018-07-08 -->
|
<insert id="saveBusinessShopCatalog" parameterType="Map">
|
insert into business_shop_catalog(catalog_id,b_id,store_id,name,level,parent_catalog_id,month,operate)
|
values(#{catalogId},#{bId},#{storeId},#{name},#{level},#{parentCatalogId},#{month},#{operate})
|
</insert>
|
|
|
<!-- 查询商品信息(Business) add by wuxw 2018-07-03 -->
|
<select id="getBusinessShopInfo" parameterType="Map" resultType="Map">
|
select s.shop_id,s.b_id,s.catalog_id,s.store_id,s.name,s.hot_buy,s.sale_price,s.open_shop_count,s.shop_count,s.start_date,s.end_date,s.operate
|
from business_shop s where 1 = 1
|
<if test="operate != null and operate != ''">
|
and s.operate = #{operate}
|
</if>
|
<if test="bId != null and bId !=''">
|
and s.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId != ''">
|
and s.shop_id = #{shopId}
|
</if>
|
</select>
|
|
|
<!-- 查询商品属性信息(Business) add by wuxw 2018-07-03 -->
|
<select id="getBusinessShopAttrs" parameterType="Map" resultType="Map">
|
select sa.b_id,sa.attr_id,sa.shop_id,sa.spec_cd,sa.value,sa.operate
|
from business_shop_attr sa where 1=1
|
<if test="operate != null and operate != ''">
|
and sa.operate = #{operate}
|
</if>
|
<if test="bId != null and bId !=''">
|
and sa.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId != ''">
|
and sa.shop_id = #{shopId}
|
</if>
|
<if test="attrId != null and attrId != ''">
|
and sa.attr_id = #{attrId}
|
</if>
|
</select>
|
|
<!-- 查询 商品 属性参数 add by wuxw 2018-07-03 -->
|
<select id="getBusinessShopAttrParams" parameterType="Map" resultType="Map">
|
select sap.attr_param_id,sap.b_id,sap.shop_id,sap.spec_cd,sap.param,sap.operate
|
from business_shop_attr_param sap where 1=1
|
<if test="operate != null and operate != ''">
|
and sap.operate = #{operate}
|
</if>
|
<if test="bId != null and bId !=''">
|
and sap.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId != ''">
|
and sap.shop_id = #{shopId}
|
</if>
|
<if test="attrParamId != null and attrParamId != ''">
|
and sap.attr_param_id = #{attrParamId}
|
</if>
|
</select>
|
|
<!-- 查询商品照片信息 add by wuxw 2018-07-03 -->
|
<select id="getBusinessShopPhoto" parameterType="Map" resultType="Map">
|
select sp.shop_photo_id,sp.b_id,sp.shop_id,sp.shop_photo_type_cd,sp.photo,sp.operate
|
from business_shop_photo sp where 1=1
|
<if test="bId != null and bId !=''">
|
and sp.b_id = #{bId}
|
</if>
|
<if test="operate != null and operate != ''">
|
and sp.operate = #{operate}
|
</if>
|
<if test="shopId != null and shopId != ''">
|
and sp.shop_id = #{shopId}
|
</if>
|
</select>
|
|
<!-- 查询商品 证件信息 add by wuxw 2018-07-03 -->
|
<select id="getBusinessShopPreferential" parameterType="Map" resultType="Map">
|
select sp.shop_preferential_id,sp.b_id,sp.shop_id,sp.original_price,sp.discount_rate,sp.show_original_price,sp.preferential_start_date,sp.preferential_end_date,sp.operate
|
from business_shop_preferential sp where 1 = 1
|
<if test="bId != null and bId !=''">
|
and sp.b_id = #{bId}
|
</if>
|
<if test="operate != null and operate != ''">
|
and sp.operate = #{operate}
|
</if>
|
<if test="shopId != null and shopId != ''">
|
and sp.shop_id = #{shopId}
|
</if>
|
</select>
|
|
<!-- 查询商品 描述信息 add by wuxw 2018-07-03 -->
|
<select id="getBusinessShopDesc" parameterType="Map" resultType="Map">
|
select sd.shop_desc_id,sd.b_id,sd.shop_id,sd.shop_describe,sd.operate
|
from business_shop_desc sd where 1 = 1
|
<if test="bId != null and bId !=''">
|
and sd.b_id = #{bId}
|
</if>
|
<if test="operate != null and operate != ''">
|
and sd.operate = #{operate}
|
</if>
|
<if test="shopId != null and shopId != ''">
|
and sd.shop_id = #{shopId}
|
</if>
|
</select>
|
|
<!-- 查询商品目录(business) add by wuxw 2018-07-03 -->
|
<select id="getBusinessShopCatalog" parameterType="Map" resultType="Map">
|
select sc.catalog_id,sc.b_id,sc.store_id,sc.name,sc.level,sc.parent_catalog_id,sc.operate
|
from business_shop_catalog sc where 1=1
|
<if test="bId != null and bId !=''">
|
and sc.b_id = #{bId}
|
</if>
|
<if test="operate != null and operate != ''">
|
and sc.operate = #{operate}
|
</if>
|
<if test="shopId != null and shopId != ''">
|
and sc.store_id = #{storeId}
|
</if>
|
</select>
|
|
<!-- 保存商品信息至 instance表中 add by wuxw 2018-07-03 -->
|
<insert id="saveShopInfoInstance" parameterType="Map">
|
insert into s_shop(shop_id,b_id,catalog_id,store_id,name,hot_buy,sale_price,open_shop_count,shop_count,start_date,end_date,status_cd)
|
select s.shop_id,s.b_id,s.catalog_id,s.store_id,s.name,s.hot_buy,s.sale_price,s.open_shop_count,s.shop_count,s.start_date,s.end_date,'0'
|
from business_shop s where
|
s.operate = 'ADD' and s.b_id=#{bId}
|
</insert>
|
|
<!-- 保存商品属性信息到 instance add by wuxw 2018-07-03 -->
|
<insert id="saveShopAttrsInstance" parameterType="Map">
|
insert into s_shop_attr(b_id,attr_id,shop_id,spec_cd,value,status_cd)
|
select sa.b_id,sa.attr_id,sa.shop_id,sa.spec_cd,sa.value,'0'
|
from business_shop_attr sa
|
where sa.operate = 'ADD' and sa.b_id=#{bId}
|
</insert>
|
|
<!-- 保存商品属性参数 instance add by wuxw 2018-07-07 -->
|
<insert id="saveShopAttrParamsInstance" parameterType="Map">
|
insert into s_shop_attr_param(attr_param_id,b_id,shop_id,spec_cd,param,status_cd)
|
select sap.attr_param_id,sap.b_id,sap.shop_id,sap.spec_cd,sap.param,'0'
|
from business_shop_attr_param sap
|
where sap.operate = 'ADD' and sap.b_id=#{bId}
|
</insert>
|
|
<!-- 保存 商品照片信息 instance add by wuxw 2018-07-03 -->
|
<insert id="saveShopPhotoInstance" parameterType="Map">
|
insert into s_shop_photo(shop_photo_id,b_id,shop_id,shop_photo_type_cd,photo,status_cd)
|
select sp.shop_photo_id,sp.b_id,sp.shop_id,sp.shop_photo_type_cd,sp.photo,'0'
|
from business_shop_photo sp
|
where sp.operate = 'ADD' and sp.b_id=#{bId}
|
</insert>
|
<!-- 保存 商品证件信息 instance add by wuxw 2018-07-03 -->
|
<insert id="saveShopPreferentialInstance" parameterType="Map">
|
insert into s_shop_preferential(shop_preferential_id,b_id,shop_id,original_price,discount_rate,show_original_price,preferential_start_date,preferential_end_date,status_cd)
|
select sp.shop_preferential_id,sp.b_id,sp.shop_id,sp.original_price,sp.discount_rate,sp.show_original_price,sp.preferential_start_date,sp.preferential_end_date,'0'
|
from business_shop_preferential sp
|
where sp.operate = 'ADD' and sp.b_id=#{bId}
|
</insert>
|
|
<!-- 保存 商品描述信息 instance add by wuxw 2018-07-03 -->
|
<insert id="saveShopDescInstance" parameterType="Map">
|
insert into s_shop_desc(shop_desc_id,b_id,shop_id,shop_describe,status_cd)
|
select sd.shop_desc_id,sd.b_id,sd.shop_id,sd.shop_describe,'0'
|
from business_shop_desc sd
|
where sd.operate = 'ADD' and sd.b_id=#{bId}
|
</insert>
|
|
<!-- 保存 商品目录 信息 instance add by wuxw 2018-07-08 -->
|
<insert id="saveShopCatalogInstance" parameterType="Map">
|
insert into s_shop_catalog(catalog_id,b_id,store_id,name,level,parent_catalog_id,status_cd)
|
select sc.catalog_id,sc.b_id,sc.store_id,sc.name,sc.level,sc.parent_catalog_id,'0'
|
from business_shop_catalog sc
|
where sc.operate = 'ADD' and sc.b_id=#{bId}
|
</insert>
|
|
<!-- 商品购买记录 保存 add by wuxw 2018-07-08 -->
|
<insert id="saveBuyShopInstance" parameterType="Map">
|
insert into s_buy_shop(buy_id,b_id,shop_id,buy_count,month,status_cd)
|
values(#{buyId},#{bId},#{shopId},#{buyCount},#{month},'0')
|
</insert>
|
|
<!-- 保存购买记录属性 add by wuxw 2018-07-08 -->
|
<insert id="saveBuyShopAttrInstance" parameterType="Map">
|
insert into s_buy_shop_attr(buy_id,b_id,attr_id,spec_cd,value,month,status_cd)
|
values(#{buyId},#{bId},#{attrId},#{specCd},#{value},#{month},'0')
|
</insert>
|
|
<!-- 查询商品信息 add by wuxw 2018-07-03 -->
|
<select id="getShopInfo" parameterType="Map" resultType="Map">
|
select s.shop_id,s.b_id,s.catalog_id,s.store_id,s.name,s.hot_buy,s.sale_price,s.open_shop_count,s.shop_count,s.start_date,s.end_date,s.status_cd
|
from s_shop s
|
where 1=1
|
<if test="statusCd != null and statusCd != ''">
|
and s.status_cd = #{statusCd}
|
</if>
|
|
<if test="bId != null and bId !=''">
|
and s.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId !=''">
|
and s.shop_id = #{shopId}
|
</if>
|
</select>
|
|
<!-- 查询商品属性信息 add by wuxw 2018-07-03 -->
|
<select id="getShopAttrs" parameterType="Map" resultType="Map">
|
select sa.b_id,sa.attr_id,sa.shop_id,sa.spec_cd,sa.value,sa.status_cd
|
from s_shop_attr sa
|
where
|
1=1
|
<if test="statusCd != null and statusCd != ''">
|
and sa.status_cd = #{statusCd}
|
</if>
|
<if test="bId != null and bId !=''">
|
and sa.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId !=''">
|
and sa.shop_id = #{shopId}
|
</if>
|
<if test="attrId != null and attrId != ''">
|
and sa.attr_id = #{attrId}
|
</if>
|
</select>
|
|
<!-- 查询商品属性参数信息 add by wuxw 2018-07-06 -->
|
<select id="getShopAttrParams" parameterType="Map" resultType="Map">
|
select sap.attr_param_id,sap.b_id,sap.shop_id,sap.spec_cd,sap.param,sap.status_cd
|
from s_shop_attr_param sap
|
where
|
1=1
|
<if test="statusCd != null and statusCd != ''">
|
and sap.status_cd = #{statusCd}
|
</if>
|
<if test="bId != null and bId !=''">
|
and sap.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId !=''">
|
and sap.shop_id = #{shopId}
|
</if>
|
<if test="attrParamId != null and attrParamId != ''">
|
and sap.attr_param_id = #{attrParamId}
|
</if>
|
</select>
|
|
<!-- 查询商品照片信息 add by wuxw 2018-07-03 -->
|
<select id="getShopPhoto" parameterType="Map" resultType="Map">
|
select sp.shop_photo_id,sp.b_id,sp.shop_id,sp.shop_photo_type_cd,sp.photo,sp.status_cd
|
from s_shop_photo sp
|
where 1=1
|
<if test="statusCd != null and statusCd != ''">
|
and sp.status_cd = #{statusCd}
|
</if>
|
<if test="bId != null and bId !=''">
|
and sp.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId !=''">
|
and sp.shop_id = #{shopId}
|
</if>
|
</select>
|
|
<!-- 查询商品证件信息 add by wuxw 2018-07-03 -->
|
<select id="getShopPreferential" parameterType="Map" resultType="Map">
|
select sp.shop_preferential_id,sp.b_id,sp.shop_id,sp.original_price,sp.discount_rate,sp.show_original_price,sp.preferential_start_date,sp.preferential_end_date,sp.status_cd
|
from s_shop_preferential sp
|
where 1=1
|
<if test="statusCd != null and statusCd != ''">
|
and sp.status_cd = #{statusCd}
|
</if>
|
<if test="bId != null and bId !=''">
|
and sp.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId !=''">
|
and sp.shop_id = #{shopId}
|
</if>
|
</select>
|
|
<!-- 查询商品证件信息 add by wuxw 2018-07-03 -->
|
<select id="getShopDesc" parameterType="Map" resultType="Map">
|
select sd.shop_desc_id,sd.b_id,sd.shop_id,sd.shop_describe,sd.status_cd
|
from s_shop_desc sd
|
where 1=1
|
<if test="statusCd != null and statusCd != ''">
|
and sd.status_cd = #{statusCd}
|
</if>
|
<if test="bId != null and bId !=''">
|
and sd.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId !=''">
|
and sd.shop_id = #{shopId}
|
</if>
|
</select>
|
|
<!-- 查询商品目录 instance add by wuxw 2018-07-08 -->
|
<select id="getShopCatalog" parameterType="Map" resultType="Map">
|
select sc.catalog_id,sc.b_id,sc.store_id,sc.name,sc.level,sc.parent_catalog_id,sc.status_cd
|
from s_shop_catalog sc
|
where 1=1
|
<if test="statusCd != null and statusCd != ''">
|
and sc.status_cd = #{statusCd}
|
</if>
|
<if test="bId != null and bId !=''">
|
and sc.b_id = #{bId}
|
</if>
|
<if test="catalogId != null and catalogId !=''">
|
and sc.catalog_id = #{catalogId}
|
</if>
|
</select>
|
|
<!-- 查询商品目录 instance add by wuxw 2018-07-08 -->
|
<select id="getBuyShop" parameterType="Map" resultType="Map">
|
select bs.buy_id,bs.b_id,bs.shop_id,bs.buy_count,bs.month,bs.status_cd
|
from s_buy_shop bs
|
where 1=1
|
<if test="statusCd != null and statusCd != ''">
|
and bs.status_cd = #{statusCd}
|
</if>
|
<if test="bId != null and bId !=''">
|
and bs.b_id = #{bId}
|
</if>
|
<if test="buyId != null and buyId !=''">
|
and bs.buy_id = #{buyId}
|
</if>
|
</select>
|
|
<!-- 查询购买记录属性信息 add by wuxw 2018-07-03 -->
|
<select id="getBuyShopAttrs" parameterType="Map" resultType="Map">
|
select bs.b_id,bs.attr_id,bs.buy_id,bs.spec_cd,bs.value,bs.status_cd
|
from s_buy_shop_attr bs
|
where
|
1=1
|
<if test="statusCd != null and statusCd != ''">
|
and bs.status_cd = #{statusCd}
|
</if>
|
<if test="bId != null and bId !=''">
|
and bs.b_id = #{bId}
|
</if>
|
<if test="buyId != null and buyId !=''">
|
and bs.buy_id = #{buyId}
|
</if>
|
<if test="attrId != null and attrId != ''">
|
and bs.attr_id = #{attrId}
|
</if>
|
</select>
|
|
|
<!-- 修改商品信息 add by wuxw 2018-07-03 -->
|
<update id="updateShopInfoInstance" parameterType="Map">
|
update s_shop s set s.status_cd = #{statusCd}
|
<if test="newBId != null and newBId != ''">
|
,s.b_id = #{newBId}
|
</if>
|
<if test="storeId != null and storeId != ''">
|
,s.store_id = #{storeId}
|
</if>
|
<if test="catalogId != null and catalogId != ''">
|
,s.catalog_id = #{catalogId}
|
</if>
|
<if test="name != null and name != ''">
|
,s.name = #{name}
|
</if>
|
<if test="hotBuy != null and hotBuy != ''">
|
,s.hot_buy = #{hotBuy}
|
</if>
|
<if test="salePrice != null and salePrice != ''">
|
,s.sale_price = #{salePrice}
|
</if>
|
<if test="openShopCount != null and openShopCount != ''">
|
,s.open_shop_count = #{openShopCount}
|
</if>
|
<if test="shopCount != null and shopCount != ''">
|
,s.shop_count = #{shopCount}
|
</if>
|
<if test="startDate != null">
|
,s.start_date = #{startDate}
|
</if>
|
<if test="endDate != null">
|
,s.end_date = #{endDate}
|
</if>
|
where 1=1
|
<if test="bId != null and bId !=''">
|
and s.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId !=''">
|
and s.shop_id = #{shopId}
|
</if>
|
</update>
|
|
<!-- 修改商品属性信息 add by wuxw 2018-07-03 -->
|
<update id="updateShopAttrInstance" parameterType="Map">
|
update s_shop_attr sa set sa.status_cd = #{statusCd}
|
<if test="newBId != null and newBId != ''">
|
,sa.b_id = #{newBId}
|
</if>
|
<if test="value != null and value != ''">
|
,sa.value = #{value}
|
</if>
|
where 1=1
|
<if test="bId != null and bId !=''">
|
and sa.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId !=''">
|
and sa.shop_id = #{shopId}
|
</if>
|
<if test="specCd != null and specCd !=''">
|
and sa.spec_cd = #{specCd}
|
</if>
|
<if test="attrId != null and attrId !=''">
|
and sa.attr_id = #{attrId}
|
</if>
|
</update>
|
|
<!-- 修改商品属性参数信息 add by wuxw 2018-07-03 -->
|
<update id="updateShopAttrParamInstance" parameterType="Map">
|
update s_shop_attr_param sap set sap.status_cd = #{statusCd}
|
<if test="newBId != null and newBId != ''">
|
,sap.b_id = #{newBId}
|
</if>
|
<if test="param != null and param != ''">
|
,sap.param = #{param}
|
</if>
|
where 1=1
|
<if test="bId != null and bId !=''">
|
and sap.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId !=''">
|
and sap.shop_id = #{shopId}
|
</if>
|
<if test="specCd != null and specCd !=''">
|
and sap.spec_cd = #{specCd}
|
</if>
|
<if test="attrParamId != null and attrParamId !=''">
|
and sap.attr_param_id = #{attrParamId}
|
</if>
|
</update>
|
|
<!-- 修改商品照片信息 add by wuxw 2018-07-03 -->
|
<update id="updateShopPhotoInstance" parameterType="Map">
|
update s_shop_photo sp set sp.status_cd = #{statusCd}
|
<if test="newBId != null and newBId != ''">
|
,sp.b_id = #{newBId}
|
</if>
|
<if test="shopPhotoTypeCd != null and shopPhotoTypeCd != ''">
|
,sp.shop_photo_type_cd = #{shopPhotoTypeCd}
|
</if>
|
<if test="photo != null and photo != ''">
|
,sp.photo = #{photo}
|
</if>
|
where 1=1
|
<if test="bId != null and bId !=''">
|
and sp.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId !=''">
|
and sp.shop_id = #{shopId}
|
</if>
|
<if test="shopPhotoId != null and shopPhotoId !=''">
|
and sp.shop_photo_id = #{shopPhotoId}
|
</if>
|
</update>
|
|
<!-- 修改商品优惠信息 add by wuxw 2018-07-03 -->
|
<update id="updateShopPreferentialInstance" parameterType="Map">
|
update s_shop_preferential sp set sp.status_cd = #{statusCd}
|
<if test="newBId != null and newBId != ''">
|
,sp.b_id = #{newBId}
|
</if>
|
<if test="originalPrice != null and originalPrice != ''">
|
,sp.original_price = #{originalPrice}
|
</if>
|
<if test="discountRate != null and discountRate != ''">
|
,sp.discount_rate = #{discountRate}
|
</if>
|
<if test="showOriginalPrice != null and showOriginalPrice != ''">
|
,sp.show_original_price = #{showOriginalPrice}
|
</if>
|
<if test="preferentialStartDate != null ">
|
,sp.preferential_start_date = #{preferentialStartDate}
|
</if>
|
<if test="preferentialEndDate != null ">
|
,sp.preferential_end_date = #{preferentialEndDate}
|
</if>
|
where 1=1
|
<if test="bId != null and bId !=''">
|
and sp.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId !=''">
|
and sp.shop_id = #{shopId}
|
</if>
|
<if test="shopPreferentialId != null and shopPreferentialId !=''">
|
and sp.shop_preferential_id = #{shopPreferentialId}
|
</if>
|
</update>
|
|
<!-- 修改商品优惠信息 add by wuxw 2018-07-03 -->
|
<update id="updateShopDescInstance" parameterType="Map">
|
update s_shop_desc sd set sd.status_cd = #{statusCd}
|
<if test="newBId != null and newBId != ''">
|
,sd.b_id = #{newBId}
|
</if>
|
<if test="shopDescribe != null and shopDescribe != ''">
|
,sd.shop_describe = #{shopDescribe}
|
</if>
|
where 1=1
|
<if test="bId != null and bId !=''">
|
and sd.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId !=''">
|
and sd.shop_id = #{shopId}
|
</if>
|
<if test="shopDescId != null and shopDescId !=''">
|
and sd.shop_desc_id = #{shopDescId}
|
</if>
|
</update>
|
|
<!-- 修改 商品目录信息 add by wuxw 2018-07-08 -->
|
<update id="updateShopCatalogInstance" parameterType="Map">
|
update s_shop_catalog sc set sc.status_cd = #{statusCd}
|
<if test="newBId != null and newBId != ''">
|
,sc.b_id = #{newBId}
|
</if>
|
<if test="name != null and name != ''">
|
,sc.name = #{name}
|
</if>
|
<if test="level != null and level != ''">
|
,sc.level = #{level}
|
</if>
|
<if test="parentCatalogId != null and parentCatalogId != ''">
|
,sc.parent_catalog_id = #{parentCatalogId}
|
</if>
|
where 1=1
|
<if test="bId != null and bId !=''">
|
and sc.b_id = #{bId}
|
</if>
|
<if test="storeId != null and storeId !=''">
|
and sc.store_id = #{storeId}
|
</if>
|
<if test="catalogId != null and catalogId !=''">
|
and sc.catalog_id = #{catalogId}
|
</if>
|
</update>
|
|
<!-- 修改 商品购买信息 add by wuxw 2018-07-08 -->
|
<update id="updateBuyShopInstance" parameterType="Map">
|
update s_buy_shop bs set bs.status_cd = #{statusCd}
|
<if test="newBId != null and newBId != ''">
|
,bs.b_id = #{newBId}
|
</if>
|
<if test="buyCount != null and buyCount != ''">
|
,bs.buy_count = #{buy_count}
|
</if>
|
where 1=1
|
<if test="bId != null and bId !=''">
|
and bs.b_id = #{bId}
|
</if>
|
<if test="shopId != null and shopId !=''">
|
and bs.shop_id = #{shopId}
|
</if>
|
<if test="buyId != null and buyId !=''">
|
and bs.buy_id = #{buyId}
|
</if>
|
</update>
|
|
<!-- 修改商品属性信息 add by wuxw 2018-07-03 -->
|
<update id="updateBuyShopAttrInstance" parameterType="Map">
|
update s_buy_shop_attr bsa set bsa.status_cd = #{statusCd}
|
<if test="newBId != null and newBId != ''">
|
,bsa.b_id = #{newBId}
|
</if>
|
<if test="value != null and value != ''">
|
,bsa.value = #{value}
|
</if>
|
where 1=1
|
<if test="bId != null and bId !=''">
|
and bsa.b_id = #{bId}
|
</if>
|
<if test="buyId != null and buyId !=''">
|
and bsa.buy_id = #{buyId}
|
</if>
|
<if test="specCd != null and specCd !=''">
|
and bsa.spec_cd = #{specCd}
|
</if>
|
<if test="attrId != null and attrId !=''">
|
and bsa.attr_id = #{attrId}
|
</if>
|
</update>
|
</mapper>
|