| | |
| | | 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"> |
| | |
| | | and sap.b_id = #{bId} |
| | | </if> |
| | | <if test="shopId != null and shopId != ''"> |
| | | and sa.shop_id = #{shopId} |
| | | and sap.shop_id = #{shopId} |
| | | </if> |
| | | <if test="attrParamId != null and attrParamId != ''"> |
| | | and sa.attr_param_id = #{attrParamId} |
| | | and sap.attr_param_id = #{attrParamId} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | |
| | | <!-- 查询商品 证件信息 add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessShopPreferential" parameterType="Map" resultType="Map"> |
| | | select sp.shop_preferential_id,sp.b_id,sc.shop_id,sp.original_price,sp.discount_rate,sp.show_original_price,sp.preferential_start_date,sp.preferential_end_date,sp.operate |
| | | 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> |
| | | </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) |
| | |
| | | <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 sa |
| | | where sa.operate = 'ADD' and sa.b_id=#{bId} |
| | | from business_shop_attr_param sap |
| | | where sap.operate = 'ADD' and sap.b_id=#{bId} |
| | | </insert> |
| | | |
| | | <!-- 保存 商品照片信息 instance add by wuxw 2018-07-03 --> |
| | |
| | | <!-- 保存 商品证件信息 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,sc.shop_id,sp.original_price,sp.discount_rate,sp.show_original_price,sp.preferential_start_date,sp.preferential_end_date,'0' |
| | | 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> |
| | |
| | | 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 --> |
| | |
| | | |
| | | <!-- 查询商品证件信息 add by wuxw 2018-07-03 --> |
| | | <select id="getShopPreferential" parameterType="Map" resultType="Map"> |
| | | select sp.shop_preferential_id,sp.b_id,sc.shop_id,sp.original_price,sp.discount_rate,sp.show_original_price,sp.preferential_start_date,sp.preferential_end_date,sc.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,sp.status_cd |
| | | from s_shop_preferential sp |
| | | where 1=1 |
| | | <if test="statusCd != null and statusCd != ''"> |
| | |
| | | </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 --> |
| | |
| | | <if test="shopCount != null and shopCount != ''"> |
| | | ,s.shop_count = #{shopCount} |
| | | </if> |
| | | <if test="startDate != null and startDate != ''"> |
| | | <if test="startDate != null"> |
| | | ,s.start_date = #{startDate} |
| | | </if> |
| | | <if test="endDate != null and endDate != ''"> |
| | | <if test="endDate != null"> |
| | | ,s.end_date = #{endDate} |
| | | </if> |
| | | where 1=1 |
| | |
| | | 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> |