|
@@ -782,109 +782,62 @@
|
|
|
and newvalidFlag=1
|
|
|
limit 5
|
|
|
</select>
|
|
|
- <select id="getNewFloorList" resultType="com.caimei365.commodity.model.po.ProductPo">
|
|
|
+ <select id="getNewFloorList" resultType="com.caimei365.commodity.model.vo.ProductItemVo">
|
|
|
SELECT
|
|
|
- a.productID AS "id",
|
|
|
- a.productID AS "productID",
|
|
|
- a.brandID AS "brandID",
|
|
|
- a.bigTypeID AS "bigTypeID",
|
|
|
- ifnull(a.smallTypeID,-1) AS "smallTypeID",
|
|
|
- ifnull(a.tinyTypeID,-1) AS "tinyTypeID",
|
|
|
- a.selfTypeID AS "selfTypeID",
|
|
|
- a.preferredFlag AS "preferredFlag",
|
|
|
- a.shopID AS "shopID",
|
|
|
- a.name AS "name",
|
|
|
- a.searchKey AS "searchKey",
|
|
|
- a.combinationID AS "combinationID",
|
|
|
- a.productRemarks AS "productRemarks",
|
|
|
- a.normalPrice AS "normalPrice",
|
|
|
- a.price AS "price",
|
|
|
- a.priceFlag AS "priceFlag",
|
|
|
- a.beautyActFlag AS "beautyActFlag",
|
|
|
- a.ladderPriceFlag AS "ladderPriceFlag",
|
|
|
- a.stock AS "stock",
|
|
|
- a.hasSkuFlag AS "hasSkuFlag",
|
|
|
- a.mainImage AS "mainImage",
|
|
|
- a.propertiesInfo AS "propertiesInfo",
|
|
|
- a.addTime AS "addTime",
|
|
|
- a.updateTime AS "updateTime",
|
|
|
- a.sellNumber AS "sellNumber",
|
|
|
- a.weekSellNumber AS "weekSellNumber",
|
|
|
- a.beforeValidFlag AS "beforeValidFlag",
|
|
|
- a.validFlag AS "validFlag",
|
|
|
- a.favoriteTimes AS "favoriteTimes",
|
|
|
- a.commentScore AS "commentScore",
|
|
|
- a.commentTimes AS "commentTimes",
|
|
|
- a.selfRecommendFlag AS "selfRecommendFlag",
|
|
|
- a.sysRecommendFlag AS "sysRecommendFlag",
|
|
|
- a.sortIndex AS "sortIndex",
|
|
|
- a.featuredFlag AS "featuredFlag",
|
|
|
- a.featuredSortIndex AS "featuredSortIndex",
|
|
|
- a.productCode AS "productCode",
|
|
|
- a.unit AS "unit",
|
|
|
- a.synToERPFlag AS "synToERPFlag",
|
|
|
- a.allAreaFlag AS "allAreaFlag",
|
|
|
- a.provinceIDs AS "provinceIDs",
|
|
|
- a.serviceNumber AS "serviceNumber",
|
|
|
- a.maxBuyNumber AS "maxBuyNumber",
|
|
|
- a.minBuyNumber AS "minBuyNumber",
|
|
|
- a.packageCount AS "packageCount",
|
|
|
- a.byFlag AS "byFlag",
|
|
|
- a.normalProductFlag AS "normalProductFlag",
|
|
|
- a.wholeSaleProductFlag AS "wholeSaleProductFlag",
|
|
|
- a.promotionProductFlag AS "promotionProductFlag",
|
|
|
- a.groupBuyProductFlag AS "groupBuyProductFlag",
|
|
|
- a.step AS "step",
|
|
|
- a.actStatus AS "actStatus",
|
|
|
- a.actFlag AS "actFlag",
|
|
|
- a.actType AS "actType",
|
|
|
- a.onlineTime AS "onlineTime",
|
|
|
- a.downlineTime AS "downlineTime",
|
|
|
- a.freePostFlag AS "freePostFlag",
|
|
|
- a.costPrice AS "costPrice",
|
|
|
- a.costProportional AS "costProportional",
|
|
|
- a.costCheckFlag AS "costCheckFlag",
|
|
|
- a.precisehKey AS "precisehKey",
|
|
|
- s.name AS "shopName",
|
|
|
- a.actSort AS "actSort",
|
|
|
- a.recommendType AS "recommendType",
|
|
|
- a.aliasName as "aliasName",
|
|
|
- a.visibility as "visibility",
|
|
|
- a.productType as "productType",
|
|
|
- a.qualificationImg as "qualificationImg",
|
|
|
- a.includedTax as "includedTax",
|
|
|
- a.invoiceType as "invoiceType",
|
|
|
- a.taxPoint as "taxPoint",
|
|
|
- a.tags as "tags",
|
|
|
- a.machineType as "machineType",
|
|
|
- a.trainingMethod as "trainingMethod",
|
|
|
- a.trainingType as "trainingType",
|
|
|
- a.trainingFee as "trainingFee",
|
|
|
- a.commodityType as "commodityType",
|
|
|
- a.splitCode,
|
|
|
- a.announType,
|
|
|
- a.newvalidFlag,
|
|
|
- a.showFlag,
|
|
|
- a.showTime,
|
|
|
- a.newshowTime,
|
|
|
- a.recommend
|
|
|
- FROM product a
|
|
|
- LEFT JOIN shop s on s.shopID = a.shopID
|
|
|
- left join product p on a.productID = p.productId
|
|
|
+ p.productID,
|
|
|
+ p.actStatus,
|
|
|
+ p.name,
|
|
|
+ p.aliasName,
|
|
|
+ p.visibility,
|
|
|
+ p.mainImage as image,
|
|
|
+ p.unit,
|
|
|
+ p.productCode as code,
|
|
|
+ p.priceFlag,
|
|
|
+ p.price,
|
|
|
+ p.shopID as shopId,
|
|
|
+ p.searchKey as keyword,
|
|
|
+ p.minBuyNumber as minBuyNumber,
|
|
|
+ p.maxBuyNumber as maxBuyNumber,
|
|
|
+ p.ladderPriceFlag,
|
|
|
+ p.normalPrice,
|
|
|
+ p.step,
|
|
|
+ p.taxPoint as taxRate,
|
|
|
+ p.includedTax,
|
|
|
+ p.invoiceType,
|
|
|
+ p.productCategory as productCategory,
|
|
|
+ p.validFlag,
|
|
|
+ p.featuredFlag,
|
|
|
+ p.commodityType,
|
|
|
+ p.bigTypeID as bigTypeId,
|
|
|
+ p.smallTypeID as smallTypeId,
|
|
|
+ p.tinyTypeID as tinyTypeId,
|
|
|
+ p.productType,
|
|
|
+ p.brandID
|
|
|
+ from product p
|
|
|
<where>
|
|
|
- <if test="brandID!=null and brandID!=''">
|
|
|
- brandID=#{brandID}
|
|
|
+
|
|
|
+ <if test="brandID != null and brandID.size > 0">
|
|
|
+ and
|
|
|
+ <foreach collection="brandID" item="item" index="index" open="(" close=")" separator="OR">
|
|
|
+ p.brandID LIKE CONCAT('%',#{item},'%')
|
|
|
+ </foreach>
|
|
|
</if>
|
|
|
- and a.newvalidFlag = 1
|
|
|
- and a.newvalidFlag!=4
|
|
|
+ and p.newvalidFlag = 1
|
|
|
+ and p.newvalidFlag!=4
|
|
|
+ and p.validFlag = 2
|
|
|
</where>
|
|
|
- order by a.sortIndex desc
|
|
|
+
|
|
|
+# order by p.combinationSort != 0 desc, p.combinationSort asc
|
|
|
+
|
|
|
+ order by p.sortIndex desc
|
|
|
|
|
|
</select>
|
|
|
- <select id="getNewFloorBrand" resultType="com.caimei365.commodity.model.po.ProductPo">
|
|
|
- SELECT s.name FROM product a
|
|
|
+ <select id="getNewFloorBrand" resultType="com.caimei365.commodity.model.vo.BrandVo">
|
|
|
+ SELECT s.brandID as id,s.name FROM product a
|
|
|
LEFT JOIN `brand` s ON s.brandID = a.brandID
|
|
|
WHERE a.newvalidFlag = 1
|
|
|
+ and s.brandID is not null
|
|
|
+ and s.name is not null
|
|
|
AND a.newvalidFlag!=4
|
|
|
</select>
|
|
|
</mapper>
|