|
@@ -2,8 +2,9 @@
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.caimei365.commodity.mapper.PageMapper">
|
|
<mapper namespace="com.caimei365.commodity.mapper.PageMapper">
|
|
<delete id="delSku">
|
|
<delete id="delSku">
|
|
- delete from cm_sku
|
|
|
|
- where skuId=#{skuId}
|
|
|
|
|
|
+ delete
|
|
|
|
+ from cm_sku
|
|
|
|
+ where skuId = #{skuId}
|
|
</delete>
|
|
</delete>
|
|
<select id="getPageTypeSort" resultType="java.lang.Integer">
|
|
<select id="getPageTypeSort" resultType="java.lang.Integer">
|
|
select typeSort
|
|
select typeSort
|
|
@@ -156,38 +157,54 @@
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
<select id="getProductItemById" resultType="com.caimei365.commodity.model.vo.ProductItemVo">
|
|
<select id="getProductItemById" resultType="com.caimei365.commodity.model.vo.ProductItemVo">
|
|
- select p.productID as productId,
|
|
|
|
|
|
+ select p.productID as productId,
|
|
p.actStatus,
|
|
p.actStatus,
|
|
p.name,
|
|
p.name,
|
|
p.aliasName,
|
|
p.aliasName,
|
|
- p.mainImage as image,
|
|
|
|
- p.productCode as code,
|
|
|
|
|
|
+ p.mainImage as image,
|
|
|
|
+ p.productCode as code,
|
|
p.priceFlag,
|
|
p.priceFlag,
|
|
- (select unit from cm_sku where productID=#{productId} order by price asc LIMIT 1) as unit,
|
|
|
|
- (select price from cm_sku where productID=#{productId} order by price asc LIMIT 1) as price,
|
|
|
|
- (select price from cm_sku where productID=#{productId} order by price asc LIMIT 1) as originalPrice,
|
|
|
|
- p.shopID as shopId,
|
|
|
|
- p.searchKey as keyword,
|
|
|
|
- (select minBuyNumber from cm_sku where productID=#{productId} order by price asc LIMIT 1) as minBuyNumber,
|
|
|
|
- (select ladderPriceFlag from cm_sku where productID=#{productId} order by price asc LIMIT 1) as ladderPriceFlag,
|
|
|
|
- (select normalPrice from cm_sku where productID=#{productId} order by price asc LIMIT 1) as normalPrice,
|
|
|
|
|
|
+ (select unit from cm_sku where productID = #{productId} order by price asc LIMIT 1) as unit,
|
|
|
|
+ (select price from cm_sku where productID = #{productId} order by price asc LIMIT 1) as price,
|
|
|
|
+ (select price
|
|
|
|
+ from cm_sku
|
|
|
|
+ where productID = #{productId}
|
|
|
|
+ order by price asc
|
|
|
|
+ LIMIT 1) as originalPrice,
|
|
|
|
+ p.shopID as shopId,
|
|
|
|
+ p.searchKey as keyword,
|
|
|
|
+ (select minBuyNumber
|
|
|
|
+ from cm_sku
|
|
|
|
+ where productID = #{productId}
|
|
|
|
+ order by price asc
|
|
|
|
+ LIMIT 1) as minBuyNumber,
|
|
|
|
+ (select ladderPriceFlag
|
|
|
|
+ from cm_sku
|
|
|
|
+ where productID = #{productId}
|
|
|
|
+ order by price asc
|
|
|
|
+ LIMIT 1) as ladderPriceFlag,
|
|
|
|
+ (select normalPrice
|
|
|
|
+ from cm_sku
|
|
|
|
+ where productID = #{productId}
|
|
|
|
+ order by price asc
|
|
|
|
+ LIMIT 1) as normalPrice,
|
|
p.step,
|
|
p.step,
|
|
- p.shopID as shopId,
|
|
|
|
- p.taxPoint as taxRate,
|
|
|
|
|
|
+ p.shopID as shopId,
|
|
|
|
+ p.taxPoint as taxRate,
|
|
p.includedTax,
|
|
p.includedTax,
|
|
p.invoiceType,
|
|
p.invoiceType,
|
|
- p.productCategory as productCategory,
|
|
|
|
|
|
+ p.productCategory as productCategory,
|
|
p.validFlag,
|
|
p.validFlag,
|
|
p.featuredFlag,
|
|
p.featuredFlag,
|
|
p.commodityType,
|
|
p.commodityType,
|
|
- p.bigTypeID as bigTypeId,
|
|
|
|
- p.smallTypeID as smallTypeId,
|
|
|
|
- p.tinyTypeID as tinyTypeId,
|
|
|
|
- p.visibility as visibility,
|
|
|
|
- cshd.detailTalkFlag as detailTalkFlag,
|
|
|
|
|
|
+ p.bigTypeID as bigTypeId,
|
|
|
|
+ p.smallTypeID as smallTypeId,
|
|
|
|
+ p.tinyTypeID as tinyTypeId,
|
|
|
|
+ p.visibility as visibility,
|
|
|
|
+ cshd.detailTalkFlag as detailTalkFlag,
|
|
p.productType
|
|
p.productType
|
|
from product p
|
|
from product p
|
|
- left join cm_second_hand_detail cshd on p.productID = cshd.productID
|
|
|
|
|
|
+ left join cm_second_hand_detail cshd on p.productID = cshd.productID
|
|
where p.productID = #{productId}
|
|
where p.productID = #{productId}
|
|
and p.validFlag = 2
|
|
and p.validFlag = 2
|
|
</select>
|
|
</select>
|
|
@@ -213,24 +230,32 @@
|
|
order by - sort desc,createDate desc
|
|
order by - sort desc,createDate desc
|
|
</select>
|
|
</select>
|
|
<select id="getProductDetails" resultType="com.caimei365.commodity.model.vo.ProductDetailVo">
|
|
<select id="getProductDetails" resultType="com.caimei365.commodity.model.vo.ProductDetailVo">
|
|
- select p.productID as productId,
|
|
|
|
- p.shopID as shopId,
|
|
|
|
- (select normalPrice from cm_sku where productId=#{productId} order by price asc limit 1) as normalPrice,
|
|
|
|
- ifnull((select stock from cm_sku where productId=#{productId} order by price asc limit 1),0) as stock,
|
|
|
|
- (select minBuyNumber from cm_sku where productId=#{productId} order by price asc limit 1) as minBuyNumber,
|
|
|
|
- (select unit from cm_sku where productId=#{productId} order by price asc limit 1) as unit,
|
|
|
|
|
|
+ select p.productID as productId,
|
|
|
|
+ p.shopID as shopId,
|
|
|
|
+ (select normalPrice
|
|
|
|
+ from cm_sku
|
|
|
|
+ where productId = #{productId}
|
|
|
|
+ order by price asc
|
|
|
|
+ limit 1) as normalPrice,
|
|
|
|
+ ifnull((select stock from cm_sku where productId = #{productId} order by price asc limit 1), 0) as stock,
|
|
|
|
+ (select minBuyNumber
|
|
|
|
+ from cm_sku
|
|
|
|
+ where productId = #{productId}
|
|
|
|
+ order by price asc
|
|
|
|
+ limit 1) as minBuyNumber,
|
|
|
|
+ (select unit from cm_sku where productId = #{productId} order by price asc limit 1) as unit,
|
|
p.name,
|
|
p.name,
|
|
p.aliasName,
|
|
p.aliasName,
|
|
p.commodityType,
|
|
p.commodityType,
|
|
p.mainImage,
|
|
p.mainImage,
|
|
p.invoiceType,
|
|
p.invoiceType,
|
|
- p.bigTypeID as bigTypeId,
|
|
|
|
- p.smallTypeID as smallTypeId,
|
|
|
|
- p.tinyTypeID as tinyTypeId,
|
|
|
|
|
|
+ p.bigTypeID as bigTypeId,
|
|
|
|
+ p.smallTypeID as smallTypeId,
|
|
|
|
+ p.tinyTypeID as tinyTypeId,
|
|
p.searchKey,
|
|
p.searchKey,
|
|
p.visibility,
|
|
p.visibility,
|
|
p.commodityDetailsFlag,
|
|
p.commodityDetailsFlag,
|
|
- p.brandID as brandId,
|
|
|
|
|
|
+ p.brandID as brandId,
|
|
p.productType,
|
|
p.productType,
|
|
p.tags,
|
|
p.tags,
|
|
p.includedTax,
|
|
p.includedTax,
|
|
@@ -259,51 +284,51 @@
|
|
p.trainingType,
|
|
p.trainingType,
|
|
p.trainingFee,
|
|
p.trainingFee,
|
|
p.productRemarks,
|
|
p.productRemarks,
|
|
- p.productDetail as productDetailChose,
|
|
|
|
- s.shopType as shopType,
|
|
|
|
- p.qualificationNo as qualificationNo,
|
|
|
|
- p.productName as productName,
|
|
|
|
- p.qualificationTime as qualificationTime,
|
|
|
|
- p.qualificationLink as qualificationLink,
|
|
|
|
|
|
+ p.productDetail as productDetailChose,
|
|
|
|
+ s.shopType as shopType,
|
|
|
|
+ p.qualificationNo as qualificationNo,
|
|
|
|
+ p.productName as productName,
|
|
|
|
+ p.qualificationTime as qualificationTime,
|
|
|
|
+ p.qualificationLink as qualificationLink,
|
|
p.returnGoodsStutas
|
|
p.returnGoodsStutas
|
|
from product p
|
|
from product p
|
|
left join shop s on s.shopId = p.shopId
|
|
left join shop s on s.shopId = p.shopId
|
|
where p.productID = #{productId}
|
|
where p.productID = #{productId}
|
|
</select>
|
|
</select>
|
|
<select id="getBuyAgainProducts" resultType="com.caimei365.commodity.model.vo.ProductItemVo">
|
|
<select id="getBuyAgainProducts" resultType="com.caimei365.commodity.model.vo.ProductItemVo">
|
|
- select p.productID as productId,
|
|
|
|
|
|
+ select p.productID as productId,
|
|
p.actStatus,
|
|
p.actStatus,
|
|
p.name,
|
|
p.name,
|
|
p.aliasName,
|
|
p.aliasName,
|
|
- p.mainImage as image,
|
|
|
|
|
|
+ p.mainImage as image,
|
|
rpp.skuId,
|
|
rpp.skuId,
|
|
cs.unit,
|
|
cs.unit,
|
|
- p.productCode as code,
|
|
|
|
|
|
+ p.productCode as code,
|
|
p.priceFlag,
|
|
p.priceFlag,
|
|
cs.price,
|
|
cs.price,
|
|
cs.costPrice,
|
|
cs.costPrice,
|
|
ifnull(cs.costCheckFlag, 1) as costCheckFlag,
|
|
ifnull(cs.costCheckFlag, 1) as costCheckFlag,
|
|
- p.searchKey as keyword,
|
|
|
|
|
|
+ p.searchKey as keyword,
|
|
cs.minBuyNumber as minBuyNumber,
|
|
cs.minBuyNumber as minBuyNumber,
|
|
cs.ladderPriceFlag,
|
|
cs.ladderPriceFlag,
|
|
cs.normalPrice,
|
|
cs.normalPrice,
|
|
p.step,
|
|
p.step,
|
|
- p.shopID as shopId,
|
|
|
|
- p.taxPoint as taxRate,
|
|
|
|
|
|
+ p.shopID as shopId,
|
|
|
|
+ p.taxPoint as taxRate,
|
|
p.includedTax,
|
|
p.includedTax,
|
|
p.invoiceType,
|
|
p.invoiceType,
|
|
- p.productCategory as productCategory,
|
|
|
|
|
|
+ p.productCategory as productCategory,
|
|
p.validFlag,
|
|
p.validFlag,
|
|
p.featuredFlag,
|
|
p.featuredFlag,
|
|
p.commodityType,
|
|
p.commodityType,
|
|
- p.bigTypeID as bigTypeId,
|
|
|
|
- p.smallTypeID as smallTypeId,
|
|
|
|
- p.tinyTypeID as tinyTypeId,
|
|
|
|
- rpp.currentPrice as discountPrice,
|
|
|
|
|
|
+ p.bigTypeID as bigTypeId,
|
|
|
|
+ p.smallTypeID as smallTypeId,
|
|
|
|
+ p.tinyTypeID as tinyTypeId,
|
|
|
|
+ rpp.currentPrice as discountPrice,
|
|
p.productType
|
|
p.productType
|
|
from repeat_purchase_price rpp
|
|
from repeat_purchase_price rpp
|
|
- left join product p on rpp.productId = p.productID
|
|
|
|
- left join cm_sku cs on rpp.skuId = cs.skuId
|
|
|
|
|
|
+ left join product p on rpp.productId = p.productID
|
|
|
|
+ left join cm_sku cs on rpp.skuId = cs.skuId
|
|
where rpp.delFlag = '0'
|
|
where rpp.delFlag = '0'
|
|
and p.validFlag = '2'
|
|
and p.validFlag = '2'
|
|
and rpp.userId = #{userId}
|
|
and rpp.userId = #{userId}
|
|
@@ -537,6 +562,7 @@
|
|
AND appletsStatus = 1
|
|
AND appletsStatus = 1
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getProductArchiveList" resultType="com.caimei365.commodity.model.vo.ArchiveVo">
|
|
<select id="getProductArchiveList" resultType="com.caimei365.commodity.model.vo.ArchiveVo">
|
|
select cpa.id AS "archiveId",
|
|
select cpa.id AS "archiveId",
|
|
cpa.productId AS "productId",
|
|
cpa.productId AS "productId",
|
|
@@ -560,6 +586,7 @@
|
|
</where>
|
|
</where>
|
|
order by cpa.addTime desc
|
|
order by cpa.addTime desc
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getImageArchiveList" resultType="com.caimei365.commodity.model.vo.ArchiveContentVo">
|
|
<select id="getImageArchiveList" resultType="com.caimei365.commodity.model.vo.ArchiveContentVo">
|
|
select id as archiveContentId, title, addTime
|
|
select id as archiveContentId, title, addTime
|
|
from cm_product_archive_content
|
|
from cm_product_archive_content
|
|
@@ -567,6 +594,7 @@
|
|
and type = 1
|
|
and type = 1
|
|
order by addTime desc
|
|
order by addTime desc
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getVideoArchiveList" resultType="com.caimei365.commodity.model.vo.ArchiveContentVo">
|
|
<select id="getVideoArchiveList" resultType="com.caimei365.commodity.model.vo.ArchiveContentVo">
|
|
select id as archiveContentId, title, addTime
|
|
select id as archiveContentId, title, addTime
|
|
from cm_product_archive_content
|
|
from cm_product_archive_content
|
|
@@ -574,6 +602,7 @@
|
|
and type = 2
|
|
and type = 2
|
|
order by addTime desc
|
|
order by addTime desc
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getFileArchiveList" resultType="com.caimei365.commodity.model.vo.ArchiveContentVo">
|
|
<select id="getFileArchiveList" resultType="com.caimei365.commodity.model.vo.ArchiveContentVo">
|
|
select id as archiveContentId, title, addTime
|
|
select id as archiveContentId, title, addTime
|
|
from cm_product_archive_content
|
|
from cm_product_archive_content
|
|
@@ -581,17 +610,20 @@
|
|
and type = 3
|
|
and type = 3
|
|
order by addTime desc
|
|
order by addTime desc
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getArchiveImageList" resultType="java.lang.String">
|
|
<select id="getArchiveImageList" resultType="java.lang.String">
|
|
select ifnull(waterOssUrl, ossUrl) as ossUrl
|
|
select ifnull(waterOssUrl, ossUrl) as ossUrl
|
|
from cm_product_archive_file
|
|
from cm_product_archive_file
|
|
where archiveContentId = #{archiveContentId}
|
|
where archiveContentId = #{archiveContentId}
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getArchiveFile" resultType="com.caimei365.commodity.model.po.ArchiveFilePo">
|
|
<select id="getArchiveFile" resultType="com.caimei365.commodity.model.po.ArchiveFilePo">
|
|
select fileName, if(cc.type = 2, ossName, ifnull(waterOssName, ossName)) as ossName, uploadTime
|
|
select fileName, if(cc.type = 2, ossName, ifnull(waterOssName, ossName)) as ossName, uploadTime
|
|
from cm_product_archive_file cf
|
|
from cm_product_archive_file cf
|
|
left join cm_product_archive_content cc on cf.archiveContentId = cc.id
|
|
left join cm_product_archive_content cc on cf.archiveContentId = cc.id
|
|
where archiveContentId = #{archiveContentId}
|
|
where archiveContentId = #{archiveContentId}
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getArchiveByArchiveId" resultType="com.caimei365.commodity.model.po.ArchivePo">
|
|
<select id="getArchiveByArchiveId" resultType="com.caimei365.commodity.model.po.ArchivePo">
|
|
select cpa.id AS "archiveId",
|
|
select cpa.id AS "archiveId",
|
|
cpa.productId AS "productId",
|
|
cpa.productId AS "productId",
|
|
@@ -607,60 +639,78 @@
|
|
left join shop s on p.shopID = s.shopID
|
|
left join shop s on p.shopID = s.shopID
|
|
where cpa.id = #{archiveId}
|
|
where cpa.id = #{archiveId}
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getClubTypeByUserId" resultType="java.lang.Integer">
|
|
<select id="getClubTypeByUserId" resultType="java.lang.Integer">
|
|
select ifnull(firstClubType, 0)
|
|
select ifnull(firstClubType, 0)
|
|
from club
|
|
from club
|
|
where userID = #{userId}
|
|
where userID = #{userId}
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getArchiveIdById" resultType="java.lang.Integer">
|
|
<select id="getArchiveIdById" resultType="java.lang.Integer">
|
|
select id
|
|
select id
|
|
from cm_product_archive
|
|
from cm_product_archive
|
|
where productId = #{productId}
|
|
where productId = #{productId}
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="findBeansHistoryByArchiveId" resultType="java.lang.Integer">
|
|
<select id="findBeansHistoryByArchiveId" resultType="java.lang.Integer">
|
|
select id
|
|
select id
|
|
from user_beans_history
|
|
from user_beans_history
|
|
where userId = #{userId}
|
|
where userId = #{userId}
|
|
and archiveId = #{archiveId}
|
|
and archiveId = #{archiveId}
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getSvipProductAdsImage" resultType="java.lang.String">
|
|
<select id="getSvipProductAdsImage" resultType="java.lang.String">
|
|
select if(#{source} = 1, pcImage, appletsImage)
|
|
select if(#{source} = 1, pcImage, appletsImage)
|
|
from cm_svip_product_adsimage
|
|
from cm_svip_product_adsimage
|
|
limit 1
|
|
limit 1
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getSvipProductList" resultType="com.caimei365.commodity.model.vo.ProductItemVo">
|
|
<select id="getSvipProductList" resultType="com.caimei365.commodity.model.vo.ProductItemVo">
|
|
- select p.productID as productId,
|
|
|
|
|
|
+ select p.productID as productId,
|
|
p.actStatus,
|
|
p.actStatus,
|
|
p.name,
|
|
p.name,
|
|
p.aliasName,
|
|
p.aliasName,
|
|
- p.mainImage as image,
|
|
|
|
- (select unit from cm_sku where productId=csp.productId order by price asc limit 1)as unit,
|
|
|
|
- p.productCode as code,
|
|
|
|
|
|
+ p.mainImage as image,
|
|
|
|
+ (select unit from cm_sku where productId = csp.productId order by price asc limit 1) as unit,
|
|
|
|
+ p.productCode as code,
|
|
p.priceFlag,
|
|
p.priceFlag,
|
|
- (select price from cm_sku where productId=csp.productId order by price asc limit 1)as price,
|
|
|
|
- p.shopID as shopId,
|
|
|
|
- p.searchKey as keyword,
|
|
|
|
- (select minBuyNumber from cm_sku where productId=csp.productId order by price asc limit 1)as minBuyNumber,
|
|
|
|
- (select ladderPriceFlag from cm_sku where productId=csp.productId order by price asc limit 1)as ladderPriceFlag,
|
|
|
|
- (select normalPrice from cm_sku where productId=csp.productId order by price asc limit 1)as normalPrice,
|
|
|
|
|
|
+ (select price from cm_sku where productId = csp.productId order by price asc limit 1) as price,
|
|
|
|
+ p.shopID as shopId,
|
|
|
|
+ p.searchKey as keyword,
|
|
|
|
+ (select minBuyNumber
|
|
|
|
+ from cm_sku
|
|
|
|
+ where productId = csp.productId
|
|
|
|
+ order by price asc
|
|
|
|
+ limit 1) as minBuyNumber,
|
|
|
|
+ (select ladderPriceFlag
|
|
|
|
+ from cm_sku
|
|
|
|
+ where productId = csp.productId
|
|
|
|
+ order by price asc
|
|
|
|
+ limit 1) as ladderPriceFlag,
|
|
|
|
+ (select normalPrice
|
|
|
|
+ from cm_sku
|
|
|
|
+ where productId = csp.productId
|
|
|
|
+ order by price asc
|
|
|
|
+ limit 1) as normalPrice,
|
|
p.step,
|
|
p.step,
|
|
- p.shopID as shopId,
|
|
|
|
- p.taxPoint as taxRate,
|
|
|
|
|
|
+ p.shopID as shopId,
|
|
|
|
+ p.taxPoint as taxRate,
|
|
p.includedTax,
|
|
p.includedTax,
|
|
p.invoiceType,
|
|
p.invoiceType,
|
|
- p.productCategory as productCategory,
|
|
|
|
|
|
+ p.productCategory as productCategory,
|
|
p.validFlag,
|
|
p.validFlag,
|
|
p.featuredFlag,
|
|
p.featuredFlag,
|
|
p.commodityType,
|
|
p.commodityType,
|
|
- p.bigTypeID as bigTypeId,
|
|
|
|
- p.smallTypeID as smallTypeId,
|
|
|
|
- p.tinyTypeID as tinyTypeId,
|
|
|
|
- p.visibility as visibility
|
|
|
|
|
|
+ p.bigTypeID as bigTypeId,
|
|
|
|
+ p.smallTypeID as smallTypeId,
|
|
|
|
+ p.tinyTypeID as tinyTypeId,
|
|
|
|
+ p.visibility as visibility
|
|
from cm_svip_product csp
|
|
from cm_svip_product csp
|
|
left join product p on p.productID = csp.productId
|
|
left join product p on p.productID = csp.productId
|
|
where p.validFlag = 2
|
|
where p.validFlag = 2
|
|
order by -csp.sort desc, csp.addTime desc
|
|
order by -csp.sort desc, csp.addTime desc
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getSvipUserIdByUserId" resultType="java.lang.Integer">
|
|
<select id="getSvipUserIdByUserId" resultType="java.lang.Integer">
|
|
select userId
|
|
select userId
|
|
from cm_svip_user
|
|
from cm_svip_user
|
|
@@ -668,12 +718,14 @@
|
|
and delFlag = '0'
|
|
and delFlag = '0'
|
|
and now() <![CDATA[ < ]]> endTime
|
|
and now() <![CDATA[ < ]]> endTime
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getBannerImages" resultType="com.caimei365.commodity.model.vo.ImageLinkVo">
|
|
<select id="getBannerImages" resultType="com.caimei365.commodity.model.vo.ImageLinkVo">
|
|
select id, title, link, crmImage as image, crmImage, crmLink, crmTitle
|
|
select id, title, link, crmImage as image, crmImage, crmLink, crmTitle
|
|
from new_page_homeimage
|
|
from new_page_homeimage
|
|
where crmEnabledStatus = 1
|
|
where crmEnabledStatus = 1
|
|
order by sort desc, createDate desc
|
|
order by sort desc, createDate desc
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getAfterSale" resultType="com.caimei365.commodity.model.vo.AfterSaleVo">
|
|
<select id="getAfterSale" resultType="com.caimei365.commodity.model.vo.AfterSaleVo">
|
|
SELECT id,
|
|
SELECT id,
|
|
organizeName,
|
|
organizeName,
|
|
@@ -692,12 +744,14 @@
|
|
WHERE id = 0
|
|
WHERE id = 0
|
|
AND delFlag = '0'
|
|
AND delFlag = '0'
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getPageIdByTypeSort" resultType="java.lang.Integer">
|
|
<select id="getPageIdByTypeSort" resultType="java.lang.Integer">
|
|
SELECT id
|
|
SELECT id
|
|
FROM cm_page
|
|
FROM cm_page
|
|
WHERE enabledStatus = 1
|
|
WHERE enabledStatus = 1
|
|
AND typeSort = #{typeSort}
|
|
AND typeSort = #{typeSort}
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getSidebarLive" resultType="com.caimei365.commodity.model.vo.LiveVo">
|
|
<select id="getSidebarLive" resultType="com.caimei365.commodity.model.vo.LiveVo">
|
|
SELECT
|
|
SELECT
|
|
id,
|
|
id,
|
|
@@ -726,6 +780,7 @@
|
|
</if>
|
|
</if>
|
|
ORDER BY topPosition
|
|
ORDER BY topPosition
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getSidebarInfo" resultType="com.caimei365.commodity.model.vo.InfoVo">
|
|
<select id="getSidebarInfo" resultType="com.caimei365.commodity.model.vo.InfoVo">
|
|
SELECT id,
|
|
SELECT id,
|
|
typeId,
|
|
typeId,
|
|
@@ -754,6 +809,7 @@
|
|
AND enabledStatus = '1'
|
|
AND enabledStatus = '1'
|
|
ORDER BY topPosition
|
|
ORDER BY topPosition
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getSidebarPageImage" resultType="com.caimei365.commodity.model.vo.PageImageVo">
|
|
<select id="getSidebarPageImage" resultType="com.caimei365.commodity.model.vo.PageImageVo">
|
|
SELECT
|
|
SELECT
|
|
id,
|
|
id,
|
|
@@ -789,11 +845,13 @@
|
|
</if>
|
|
</if>
|
|
ORDER BY topPosition
|
|
ORDER BY topPosition
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getLiveAdvertisingImage" resultType="java.lang.String">
|
|
<select id="getLiveAdvertisingImage" resultType="java.lang.String">
|
|
SELECT advertisingImage
|
|
SELECT advertisingImage
|
|
FROM new_page_live_advertising_image
|
|
FROM new_page_live_advertising_image
|
|
LIMIT 1;
|
|
LIMIT 1;
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getAuthProductByProductId" resultType="com.caimei365.commodity.model.vo.AuthProductVo">
|
|
<select id="getAuthProductByProductId" resultType="com.caimei365.commodity.model.vo.AuthProductVo">
|
|
select p.name as productName,
|
|
select p.name as productName,
|
|
p.snCode,
|
|
p.snCode,
|
|
@@ -829,6 +887,7 @@
|
|
and a.auditStatus = 1
|
|
and a.auditStatus = 1
|
|
and p.auditStatus = 1
|
|
and p.auditStatus = 1
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getStatementFile" resultType="com.caimei365.commodity.model.vo.StatementFileVo">
|
|
<select id="getStatementFile" resultType="com.caimei365.commodity.model.vo.StatementFileVo">
|
|
select name, ossName, md5Hex, uploadTime
|
|
select name, ossName, md5Hex, uploadTime
|
|
from cm_brand_auth_file
|
|
from cm_brand_auth_file
|
|
@@ -836,19 +895,22 @@
|
|
and brandId = #{brandId}
|
|
and brandId = #{brandId}
|
|
limit 1
|
|
limit 1
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getAuthProductParams" resultType="com.caimei365.commodity.model.po.BrandProductParamPo">
|
|
<select id="getAuthProductParams" resultType="com.caimei365.commodity.model.po.BrandProductParamPo">
|
|
select name, content
|
|
select name, content
|
|
from cm_brand_product_param
|
|
from cm_brand_product_param
|
|
where productId = #{productId}
|
|
where productId = #{productId}
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getSidebarBaike" resultType="com.caimei365.commodity.model.vo.BaikeProductVo">
|
|
<select id="getSidebarBaike" resultType="com.caimei365.commodity.model.vo.BaikeProductVo">
|
|
- select id as productId,id, commodityType, name, image, publishTime
|
|
|
|
|
|
+ select id as productId, id, commodityType, name, image, publishTime
|
|
from cm_baike_product
|
|
from cm_baike_product
|
|
WHERE topPosition IN (1, 2, 3)
|
|
WHERE topPosition IN (1, 2, 3)
|
|
and status = 1
|
|
and status = 1
|
|
and NOW() > publishTime
|
|
and NOW() > publishTime
|
|
order by topPosition
|
|
order by topPosition
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getBaikeTypeList" resultType="com.caimei365.commodity.model.vo.BaikeTypeVo">
|
|
<select id="getBaikeTypeList" resultType="com.caimei365.commodity.model.vo.BaikeTypeVo">
|
|
select id as typeId, name
|
|
select id as typeId, name
|
|
from cm_baike_type
|
|
from cm_baike_type
|
|
@@ -856,6 +918,7 @@
|
|
and status = 1
|
|
and status = 1
|
|
order by -sort desc, addTime desc
|
|
order by -sort desc, addTime desc
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getBaikeProducts" resultType="com.caimei365.commodity.model.vo.BaikeProductVo">
|
|
<select id="getBaikeProducts" resultType="com.caimei365.commodity.model.vo.BaikeProductVo">
|
|
select id as productId, id,commodityType, image, name, discription, publishTime, (basePv + actualPv) as pv
|
|
select id as productId, id,commodityType, image, name, discription, publishTime, (basePv + actualPv) as pv
|
|
from cm_baike_product
|
|
from cm_baike_product
|
|
@@ -873,12 +936,14 @@
|
|
limit #{limitNum}
|
|
limit #{limitNum}
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getBaikeQuestionList" resultType="java.lang.String">
|
|
<select id="getBaikeQuestionList" resultType="java.lang.String">
|
|
select question
|
|
select question
|
|
from cm_baike_product_question
|
|
from cm_baike_product_question
|
|
where productId = #{productId}
|
|
where productId = #{productId}
|
|
limit 3
|
|
limit 3
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="findHeheHomePage" resultType="com.caimei365.commodity.model.vo.CmPageVo">
|
|
<select id="findHeheHomePage" resultType="com.caimei365.commodity.model.vo.CmPageVo">
|
|
select id,
|
|
select id,
|
|
type,
|
|
type,
|
|
@@ -940,6 +1005,7 @@
|
|
order by p.sortIndex desc,newshowTime desc
|
|
order by p.sortIndex desc,newshowTime desc
|
|
limit 5
|
|
limit 5
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getNewFloorList" resultType="com.caimei365.commodity.model.vo.ProductItemVo">
|
|
<select id="getNewFloorList" resultType="com.caimei365.commodity.model.vo.ProductItemVo">
|
|
SELECT DISTINCT
|
|
SELECT DISTINCT
|
|
(select price from cm_sku where productID=p.productID order by price asc limit 1)as price,
|
|
(select price from cm_sku where productID=p.productID order by price asc limit 1)as price,
|
|
@@ -1090,74 +1156,81 @@
|
|
and p.id=#{productId}
|
|
and p.id=#{productId}
|
|
</if>
|
|
</if>
|
|
<if test="null !=typeId">
|
|
<if test="null !=typeId">
|
|
- and p.typeId=#{typeId}
|
|
|
|
|
|
+ and p.typeId=#{typeId}
|
|
</if>
|
|
</if>
|
|
<if test="null !=auditStatus">
|
|
<if test="null !=auditStatus">
|
|
- and p.auditStatus=#{auditStatus}
|
|
|
|
|
|
+ and p.auditStatus=#{auditStatus}
|
|
</if>
|
|
</if>
|
|
<if test="null !=onlineStatus">
|
|
<if test="null !=onlineStatus">
|
|
and p.onlineStatus=#{onlineStatus}
|
|
and p.onlineStatus=#{onlineStatus}
|
|
</if>
|
|
</if>
|
|
<if test="null !=status">
|
|
<if test="null !=status">
|
|
- and p.status=#{status}
|
|
|
|
|
|
+ and p.status=#{status}
|
|
</if>
|
|
</if>
|
|
<if test="null !=shopId">
|
|
<if test="null !=shopId">
|
|
- and p.shopId=#{shopId}
|
|
|
|
|
|
+ and p.shopId=#{shopId}
|
|
</if>
|
|
</if>
|
|
<if test="null !=name and '' != name">
|
|
<if test="null !=name and '' != name">
|
|
- and p.name like concat('%',#{name},'%')
|
|
|
|
|
|
+ and p.name like concat('%',#{name},'%')
|
|
</if>
|
|
</if>
|
|
order by p.addTime desc
|
|
order by p.addTime desc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<update id="upEntryStatusById">
|
|
<update id="upEntryStatusById">
|
|
- update cm_baike_product set status=#{status},publishTime=#{publishTime} where id=#{id};
|
|
|
|
|
|
+ update cm_baike_product
|
|
|
|
+ set status=#{status},
|
|
|
|
+ publishTime=#{publishTime}
|
|
|
|
+ where id = #{id};
|
|
</update>
|
|
</update>
|
|
<delete id="delEntryStatusById">
|
|
<delete id="delEntryStatusById">
|
|
- delete from cm_baike_product where id=#{id};
|
|
|
|
|
|
+ delete
|
|
|
|
+ from cm_baike_product
|
|
|
|
+ where id = #{id};
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<select id="getEntryInfoById" resultType="com.caimei365.commodity.model.vo.BaikeProductVo">
|
|
<select id="getEntryInfoById" resultType="com.caimei365.commodity.model.vo.BaikeProductVo">
|
|
- select
|
|
|
|
- p.id as productId,
|
|
|
|
- p.id,
|
|
|
|
- p.commodityType,
|
|
|
|
- p.name,
|
|
|
|
- p.discription,
|
|
|
|
- p.typeId,
|
|
|
|
- p.actualPv as pv,
|
|
|
|
- p.auditStatus,
|
|
|
|
- p.onlineStatus,
|
|
|
|
- p.status,
|
|
|
|
- p.publishTime,
|
|
|
|
- p.addTime,
|
|
|
|
- p.alias,
|
|
|
|
- p.image,
|
|
|
|
- t.name as typeName,
|
|
|
|
- p.publishSource,
|
|
|
|
- p.shopId,
|
|
|
|
- p.seoKeyword
|
|
|
|
|
|
+ select p.id as productId,
|
|
|
|
+ p.id,
|
|
|
|
+ p.commodityType,
|
|
|
|
+ p.name,
|
|
|
|
+ p.discription,
|
|
|
|
+ p.typeId,
|
|
|
|
+ p.actualPv as pv,
|
|
|
|
+ p.auditStatus,
|
|
|
|
+ p.onlineStatus,
|
|
|
|
+ p.status,
|
|
|
|
+ p.publishTime,
|
|
|
|
+ p.addTime,
|
|
|
|
+ p.alias,
|
|
|
|
+ p.image,
|
|
|
|
+ t.name as typeName,
|
|
|
|
+ p.publishSource,
|
|
|
|
+ p.shopId,
|
|
|
|
+ p.seoKeyword,
|
|
|
|
+ p.labelIds
|
|
from cm_baike_product p
|
|
from cm_baike_product p
|
|
- left join cm_baike_type t on p.typeId=t.id
|
|
|
|
- where p.id=#{id}
|
|
|
|
|
|
+ left join cm_baike_type t on p.typeId = t.id
|
|
|
|
+ where p.id = #{id}
|
|
</select>
|
|
</select>
|
|
- <select id="getImageListById" resultType="com.caimei365.commodity.model.vo.BaikeImageVo">
|
|
|
|
- select id,productId as entryId,image from cm_baike_product_image
|
|
|
|
- where productId=#{id}
|
|
|
|
|
|
+ <select id="getImageListById" resultType="com.caimei365.commodity.model.vo.BaikeImageVo">
|
|
|
|
+ select id, productId as entryId, image
|
|
|
|
+ from cm_baike_product_image
|
|
|
|
+ where productId = #{id}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="getInfoListById" resultType="com.caimei365.commodity.model.vo.BaikeInfoVo">
|
|
|
|
- select id,productId as entryId,name as infoName,content as infoContent from cm_baike_product_param
|
|
|
|
- where productId=#{id}
|
|
|
|
|
|
+ <select id="getInfoListById" resultType="com.caimei365.commodity.model.vo.BaikeInfoVo">
|
|
|
|
+ select id, productId as entryId, name as infoName, content as infoContent
|
|
|
|
+ from cm_baike_product_param
|
|
|
|
+ where productId = #{id}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="getTextInfoListById" resultType="com.caimei365.commodity.model.vo.BaikeTextInfoVo">
|
|
|
|
- select id,productId as entryId,textType,dictionaryContent,referenceId,parentId,dictionaryType from cm_baike_text_info
|
|
|
|
- where productId=#{id}
|
|
|
|
|
|
+ <select id="getTextInfoListById" resultType="com.caimei365.commodity.model.vo.BaikeTextInfoVo">
|
|
|
|
+ select id, productId as entryId, textType, dictionaryContent, referenceId, parentId, dictionaryType
|
|
|
|
+ from cm_baike_text_info
|
|
|
|
+ where productId = #{id}
|
|
</select>
|
|
</select>
|
|
- <select id="getReferenceListById" resultType="com.caimei365.commodity.model.vo.CmBaikeReferenceInfo">
|
|
|
|
- select
|
|
|
|
- id,
|
|
|
|
|
|
+ <select id="getReferenceListById" resultType="com.caimei365.commodity.model.vo.CmBaikeReferenceInfo">
|
|
|
|
+ select id,
|
|
referenceType,
|
|
referenceType,
|
|
website,
|
|
website,
|
|
articleName,
|
|
articleName,
|
|
@@ -1174,51 +1247,52 @@
|
|
imageDescription,
|
|
imageDescription,
|
|
imageUrl,
|
|
imageUrl,
|
|
ctrlId,
|
|
ctrlId,
|
|
- productId as entryId,
|
|
|
|
|
|
+ productId as entryId,
|
|
productType as entryType
|
|
productType as entryType
|
|
from cm_baike_reference_info
|
|
from cm_baike_reference_info
|
|
- where productId=#{id}
|
|
|
|
|
|
+ where productId = #{id}
|
|
</select>
|
|
</select>
|
|
- <select id="geTypeList" resultType="com.caimei365.commodity.model.vo.BaikeTypeVo">
|
|
|
|
- select id as typeId,name from cm_baike_type
|
|
|
|
|
|
+ <select id="geTypeList" resultType="com.caimei365.commodity.model.vo.BaikeTypeVo">
|
|
|
|
+ select id as typeId, name
|
|
|
|
+ from cm_baike_type
|
|
</select>
|
|
</select>
|
|
<select id="getVideoListById" resultType="com.caimei365.commodity.model.vo.BaikeVideoVo">
|
|
<select id="getVideoListById" resultType="com.caimei365.commodity.model.vo.BaikeVideoVo">
|
|
- select id, productId as entryId, fileTitle, fileName, ossName,ossUrl
|
|
|
|
|
|
+ select id, productId as entryId, fileTitle, fileName, ossName, ossUrl
|
|
from cm_baike_product_file
|
|
from cm_baike_product_file
|
|
where productId = #{id}
|
|
where productId = #{id}
|
|
</select>
|
|
</select>
|
|
<delete id="delReferenceById">
|
|
<delete id="delReferenceById">
|
|
- delete from cm_baike_reference_info where id=#{id}
|
|
|
|
|
|
+ delete
|
|
|
|
+ from cm_baike_reference_info
|
|
|
|
+ where id = #{id}
|
|
</delete>
|
|
</delete>
|
|
<select id="getReferenceById" resultType="com.caimei365.commodity.model.vo.CmBaikeReferenceInfo">
|
|
<select id="getReferenceById" resultType="com.caimei365.commodity.model.vo.CmBaikeReferenceInfo">
|
|
- select
|
|
|
|
- id,
|
|
|
|
- referenceType,
|
|
|
|
- website,
|
|
|
|
- articleName,
|
|
|
|
- websiteName,
|
|
|
|
- publishTime,
|
|
|
|
- acitationTime,
|
|
|
|
- author,
|
|
|
|
- workName,
|
|
|
|
- publicationPlace,
|
|
|
|
- press,
|
|
|
|
- publicationYear,
|
|
|
|
- acitationWeb,
|
|
|
|
- referenceDescription,
|
|
|
|
- imageDescription,
|
|
|
|
- imageUrl,
|
|
|
|
- ctrlId,
|
|
|
|
- productId as entryId,
|
|
|
|
- productType as entryType
|
|
|
|
|
|
+ select id,
|
|
|
|
+ referenceType,
|
|
|
|
+ website,
|
|
|
|
+ articleName,
|
|
|
|
+ websiteName,
|
|
|
|
+ publishTime,
|
|
|
|
+ acitationTime,
|
|
|
|
+ author,
|
|
|
|
+ workName,
|
|
|
|
+ publicationPlace,
|
|
|
|
+ press,
|
|
|
|
+ publicationYear,
|
|
|
|
+ acitationWeb,
|
|
|
|
+ referenceDescription,
|
|
|
|
+ imageDescription,
|
|
|
|
+ imageUrl,
|
|
|
|
+ ctrlId,
|
|
|
|
+ productId as entryId,
|
|
|
|
+ productType as entryType
|
|
from cm_baike_reference_info
|
|
from cm_baike_reference_info
|
|
- where id=#{id}
|
|
|
|
|
|
+ where id = #{id}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<update id="upReferenceInfoByid">
|
|
<update id="upReferenceInfoByid">
|
|
update cm_baike_reference_info
|
|
update cm_baike_reference_info
|
|
- set
|
|
|
|
- referenceType=#{referenceType},
|
|
|
|
|
|
+ set referenceType=#{referenceType},
|
|
website=#{website},
|
|
website=#{website},
|
|
articleName=#{articleName},
|
|
articleName=#{articleName},
|
|
websiteName=#{websiteName},
|
|
websiteName=#{websiteName},
|
|
@@ -1234,22 +1308,25 @@
|
|
referenceDescription=#{referenceDescription},
|
|
referenceDescription=#{referenceDescription},
|
|
imageDescription=#{imageDescription},
|
|
imageDescription=#{imageDescription},
|
|
imageUrl=#{imageUrl}
|
|
imageUrl=#{imageUrl}
|
|
- where id=#{id}
|
|
|
|
|
|
+ where id = #{id}
|
|
</update>
|
|
</update>
|
|
<insert id="insertReferenceInfo">
|
|
<insert id="insertReferenceInfo">
|
|
- insert into
|
|
|
|
- cm_baike_reference_info(referenceType, website, articleName,websiteName,publishTime,acitationTime,author,workName,publicationPlace,press,publicationYear,acitationWeb,referenceDescription,imageDescription,imageUrl,productId,productType,ctrlId)
|
|
|
|
- values (#{referenceType}, #{website}, #{articleName},#{websiteName},#{publishTimeStr},#{acitationTimeStr},#{author},#{workName},#{publicationPlace},#{press},#{publicationYearStr},#{acitationWeb},#{referenceDescription},#{imageDescription},#{imageUrl},#{entryId},#{entryType},#{ctrlId})
|
|
|
|
|
|
+ insert into cm_baike_reference_info(referenceType, website, articleName, websiteName, publishTime,
|
|
|
|
+ acitationTime, author, workName, publicationPlace, press, publicationYear,
|
|
|
|
+ acitationWeb, referenceDescription, imageDescription, imageUrl, productId,
|
|
|
|
+ productType, ctrlId)
|
|
|
|
+ values (#{referenceType}, #{website}, #{articleName}, #{websiteName}, #{publishTimeStr}, #{acitationTimeStr},
|
|
|
|
+ #{author}, #{workName}, #{publicationPlace}, #{press}, #{publicationYearStr}, #{acitationWeb},
|
|
|
|
+ #{referenceDescription}, #{imageDescription}, #{imageUrl}, #{entryId}, #{entryType}, #{ctrlId})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="upEntryInfo">
|
|
<update id="upEntryInfo">
|
|
update cm_baike_product
|
|
update cm_baike_product
|
|
- set
|
|
|
|
- commodityType=#{commodityType},
|
|
|
|
|
|
+ set commodityType=#{commodityType},
|
|
name=#{name},
|
|
name=#{name},
|
|
discription=#{discription},
|
|
discription=#{discription},
|
|
typeId=#{typeId},
|
|
typeId=#{typeId},
|
|
- auditStatus =1,
|
|
|
|
|
|
+ auditStatus =1,
|
|
onlineStatus=1,
|
|
onlineStatus=1,
|
|
status=#{status},
|
|
status=#{status},
|
|
publishTime=#{publishTime},
|
|
publishTime=#{publishTime},
|
|
@@ -1258,60 +1335,94 @@
|
|
image=#{image},
|
|
image=#{image},
|
|
publishSource=#{publishSource},
|
|
publishSource=#{publishSource},
|
|
shopId=#{shopId},
|
|
shopId=#{shopId},
|
|
- seoKeyword=#{seoKeyword}
|
|
|
|
- where id=#{id}
|
|
|
|
|
|
+ seoKeyword=#{seoKeyword},
|
|
|
|
+ labelIds = #{labelIds}
|
|
|
|
+ where id = #{id}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
- <insert id="insertEntryInfo">
|
|
|
|
|
|
+ <insert id="insertEntryInfo" useGeneratedKeys="true" keyProperty="id">
|
|
insert into cm_baike_product
|
|
insert into cm_baike_product
|
|
- (commodityType, name, discription,typeId,actualPv,auditStatus,onlineStatus,status,publishTime,addTime,alias,image,seoKeyword,publishSource,shopId)
|
|
|
|
- values (#{commodityType}, #{name}, #{discription},#{typeId},0,1,1,#{status},#{publishTime},NOW(),#{alias},#{image},#{seoKeyword},#{publishSource},#{shopId})
|
|
|
|
|
|
+ (commodityType, name, discription, typeId, actualPv, auditStatus, onlineStatus, status, publishTime, addTime,
|
|
|
|
+ alias, image, seoKeyword, publishSource, shopId, labelIds)
|
|
|
|
+ values (#{commodityType}, #{name}, #{discription}, #{typeId}, 0, 1, 1, #{status}, #{publishTime}, NOW(),
|
|
|
|
+ #{alias}, #{image}, #{seoKeyword}, #{publishSource}, #{shopId}, #{labelIds})
|
|
</insert>
|
|
</insert>
|
|
|
|
+
|
|
<delete id="delImageListByEntryId">
|
|
<delete id="delImageListByEntryId">
|
|
- delete from cm_baike_product_image where productId=#{id}
|
|
|
|
|
|
+ delete
|
|
|
|
+ from cm_baike_product_image
|
|
|
|
+ where productId = #{id}
|
|
</delete>
|
|
</delete>
|
|
|
|
+
|
|
<delete id="delVideoListByEntryId">
|
|
<delete id="delVideoListByEntryId">
|
|
- delete from cm_baike_product_file where productId=#{id}
|
|
|
|
|
|
+ delete
|
|
|
|
+ from cm_baike_product_file
|
|
|
|
+ where productId = #{id}
|
|
</delete>
|
|
</delete>
|
|
|
|
+
|
|
<delete id="delInfoListByEntryId">
|
|
<delete id="delInfoListByEntryId">
|
|
- delete from cm_baike_product_param where productId=#{id}
|
|
|
|
|
|
+ delete
|
|
|
|
+ from cm_baike_product_param
|
|
|
|
+ where productId = #{id}
|
|
</delete>
|
|
</delete>
|
|
|
|
+
|
|
<delete id="delTextListByEntryId">
|
|
<delete id="delTextListByEntryId">
|
|
- delete from cm_baike_text_info where productId=#{id}
|
|
|
|
|
|
+ delete
|
|
|
|
+ from cm_baike_text_info
|
|
|
|
+ where productId = #{id}
|
|
</delete>
|
|
</delete>
|
|
|
|
+
|
|
<delete id="delreferenceByEntryId">
|
|
<delete id="delreferenceByEntryId">
|
|
- delete from cm_baike_reference_info where productId=#{id}
|
|
|
|
|
|
+ delete
|
|
|
|
+ from cm_baike_reference_info
|
|
|
|
+ where productId = #{id}
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<insert id="insertImage">
|
|
<insert id="insertImage">
|
|
- insert into cm_baike_product_image(productId,image)
|
|
|
|
- values(#{entryId},#{image})
|
|
|
|
|
|
+ insert into cm_baike_product_image(productId, image)
|
|
|
|
+ values (#{entryId}, #{image})
|
|
</insert>
|
|
</insert>
|
|
|
|
+
|
|
<insert id="insertVideo">
|
|
<insert id="insertVideo">
|
|
- insert into cm_baike_product_file(productId,fileTitle,fileName,ossName,ossUrl)
|
|
|
|
- values(#{entryId},#{fileTitle},#{fileName},#{ossName},#{ossUrl})
|
|
|
|
|
|
+ insert into cm_baike_product_file(productId, fileTitle, fileName, ossName, ossUrl)
|
|
|
|
+ values (#{entryId}, #{fileTitle}, #{fileName}, #{ossName}, #{ossUrl})
|
|
</insert>
|
|
</insert>
|
|
|
|
+
|
|
<insert id="insertInfo">
|
|
<insert id="insertInfo">
|
|
- insert into cm_baike_product_param(productId,name,content)
|
|
|
|
- values(#{entryId},#{infoName},#{infoContent})
|
|
|
|
|
|
+ insert into cm_baike_product_param(productId, name, content)
|
|
|
|
+ values (#{entryId}, #{infoName}, #{infoContent})
|
|
</insert>
|
|
</insert>
|
|
|
|
+
|
|
<insert id="insertText">
|
|
<insert id="insertText">
|
|
- insert into cm_baike_text_info(textType,productId,dictionaryContent,referenceId,parentId,dictionaryType)
|
|
|
|
- values(#{textType},#{entryId},#{dictionaryContent},#{referenceId},#{parentId},#{dictionaryType})
|
|
|
|
|
|
+ insert into cm_baike_text_info(textType, productId, dictionaryContent, referenceId, parentId, dictionaryType)
|
|
|
|
+ values (#{textType}, #{entryId}, #{dictionaryContent}, #{referenceId}, #{parentId}, #{dictionaryType})
|
|
</insert>
|
|
</insert>
|
|
|
|
+
|
|
<insert id="insertreference">
|
|
<insert id="insertreference">
|
|
- insert into
|
|
|
|
- cm_baike_reference_info(referenceType, website, articleName,websiteName,publishTime,acitationTime,author,workName,publicationPlace,press,publicationYear,acitationWeb,referenceDescription,imageDescription,imageUrl,productId,productType,ctrlId)
|
|
|
|
- values (#{referenceType}, #{website}, #{articleName},#{websiteName},#{publishTimeStr},#{acitationTimeStr},#{author},#{workName},#{publicationPlace},#{press},#{publicationYearStr},#{acitationWeb},#{referenceDescription},#{imageDescription},#{imageUrl},#{entryId},#{entryType},#{ctrlId})
|
|
|
|
|
|
+ insert into cm_baike_reference_info(referenceType, website, articleName, websiteName, publishTime,
|
|
|
|
+ acitationTime, author, workName, publicationPlace, press, publicationYear,
|
|
|
|
+ acitationWeb, referenceDescription, imageDescription, imageUrl, productId,
|
|
|
|
+ productType, ctrlId)
|
|
|
|
+ values (#{referenceType}, #{website}, #{articleName}, #{websiteName}, #{publishTimeStr}, #{acitationTimeStr},
|
|
|
|
+ #{author}, #{workName}, #{publicationPlace}, #{press}, #{publicationYearStr}, #{acitationWeb},
|
|
|
|
+ #{referenceDescription}, #{imageDescription}, #{imageUrl}, #{entryId}, #{entryType}, #{ctrlId})
|
|
</insert>
|
|
</insert>
|
|
- <select id="getentryId" resultType="java.lang.Integer">
|
|
|
|
- select id from cm_baike_product order by id desc limit 1
|
|
|
|
- </select>
|
|
|
|
|
|
|
|
<select id="getShopid" resultType="java.lang.Integer">
|
|
<select id="getShopid" resultType="java.lang.Integer">
|
|
- select cmShopId from cm_brand_auth_user where authUserId=#{authUserId}
|
|
|
|
|
|
+ select cmShopId
|
|
|
|
+ from cm_brand_auth_user
|
|
|
|
+ where authUserId = #{authUserId}
|
|
</select>
|
|
</select>
|
|
<select id="getHelpContent" resultType="java.lang.String">
|
|
<select id="getHelpContent" resultType="java.lang.String">
|
|
- select content from helppage where helpPageID=#{helpId}
|
|
|
|
|
|
+ select content
|
|
|
|
+ from helppage
|
|
|
|
+ where helpPageID = #{helpId}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="findLabels" resultType="java.lang.String">
|
|
|
|
+ select keyword
|
|
|
|
+ from cm_user_search_frequency
|
|
|
|
+ where trueStatus = 1
|
|
|
|
+ and delStatus = 1
|
|
|
|
+ and id in (#{labelIds})
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|