Quellcode durchsuchen

Merge remote-tracking branch 'origin/developer' into developerC

# Conflicts:
#	src/main/java/com/caimei365/commodity/mapper/SearchMapper.java
#	src/main/resources/mapper/SearchMapper.xml
kaick vor 1 Jahr
Ursprung
Commit
f56f96a6e7

+ 0 - 2
src/main/java/com/caimei365/commodity/mapper/SearchFrequencyMapper.java

@@ -10,8 +10,6 @@ import java.util.List;
 @Mapper
 public interface SearchFrequencyMapper {
 
-    List<SearchFrequencyVo> getAll();
-
     List<SearchFrequencyVo> getInfoBykeyword(String keyword, Integer fromSearch);
 
     void saveInfo(SearchFrequencyVo searchFrequencyVo);

+ 0 - 15
src/main/java/com/caimei365/commodity/mapper/SearchMapper.java

@@ -35,21 +35,6 @@ public interface SearchMapper {
      */
     List<ProductDO> searchProductList();
 
-    /**
-     * 根据商品id查找 星范商品
-     */
-    MallProductDO searchMallProductByProductId(Integer productId);
-
-    /**
-     * 根据商品id查找 星范阶梯价标志
-     */
-    Integer getMallLadderPriceFlag(Integer productId);
-
-    /**
-     * 根据商品id查找 星范最小阶梯价
-     */
-    Double getMallLowerLadderPrice(Integer productId);
-
     /**
      * 获取供应商数量
      */

+ 0 - 4
src/main/java/com/caimei365/commodity/model/vo/SearchFrequencyVo.java

@@ -11,10 +11,6 @@ public class SearchFrequencyVo {
      * 数据来源(1:首页;2:信息中心)
      */
     private Integer fromSearch   ;
-    /**
-     * 接口路径
-     */
-    private String  path;
     /**
      * 关键词
      */

+ 0 - 11
src/main/resources/mapper/SearchFrequencyMapper.xml

@@ -1,21 +1,10 @@
 <?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="com.caimei365.commodity.mapper.SearchFrequencyMapper">
-    <select id="getAll" resultType="com.caimei365.commodity.model.vo.SearchFrequencyVo">
-        select id,
-               fromSearch,
-               path,
-               keyword,
-               frequency,
-               searchTime,
-               trueStatus
-        from cm_user_search_frequency
-    </select>
 
     <select id="getInfoBykeyword" resultType="com.caimei365.commodity.model.vo.SearchFrequencyVo">
         select id,
                fromSearch,
-               path,
                keyword,
                frequency,
                searchTime,

+ 18 - 50
src/main/resources/mapper/SearchMapper.xml

@@ -21,15 +21,15 @@
         t.name as p_category3_name,
         p.preferredFlag as p_preferred,
         p.productCategory as p_type,
-        IFNULL((SELECT validFlag FROM cm_organize_product_info  WHERE productId = p.productID AND organizeId = 0), 999) as p_valid,
+        p.validFlag as p_valid,
         br.weights as p_sort,
         DATE_FORMAT(p.ADDTIME,'%Y%m%d') as p_time,
         IFNULL(p.visibility,3) as p_visibility,
         ifnull(p.newvalidflag,0) as p_newvalidflag,
         p.productType as p_product_type,
         p.relatedLabels as p_labels,
-        (select unit from cm_sku where productID=#{productId} and organizeId = 0 order by price asc LIMIT 1) as p_unit,
-        (select price from cm_sku where productID=#{productId} and organizeId = 0 order by price asc LIMIT 1) as p_price
+        (select unit from cm_sku where productID=#{productId} order by price asc LIMIT 1) as p_unit,
+        (select price from cm_sku where productID=#{productId} order by price asc LIMIT 1) as p_price
     </sql>
     <sql id="Product_Joins">
         left join tinytype as t on p.tinyTypeID = t.tinyTypeID
@@ -43,66 +43,34 @@
         <include refid="Search_Product_List"/>
         from product p
         <include refid="Product_Joins"/>
-        left join cm_organize_product_info copi on copi.productId = p.productId
-        where copi.validFlag in (2,3,9) and p.productCategory = 1 and copi.organizeId = 0
+        where p.validFlag in (2,3,9) and p.productCategory = 1
         and p.productID = #{productId}
     </select>
     <select id="findProductCount" resultType="java.lang.Integer">
         select count(*)
-        from product p
-                 left join cm_organize_product_info copi on copi.productId = p.productId
-        where copi.validFlag in (2, 3, 9) and copi.organizeId = 0
-          and p.productCategory = 1
+        from product
+        where validFlag in (2, 3, 9)
+          and productCategory = 1
     </select>
     <select id="findProductInvalidCount" resultType="java.lang.Integer">
         select count(*)
-        from product p
-                 left join cm_organize_product_info copi on copi.productId = p.productId
-        where copi.validFlag not in (2, 3, 9) and copi.organizeId = 0
-           or p.productCategory != 1
+        from product
+        where validFlag not in (2, 3, 9)
+           or productCategory != 1
     </select>
     <select id="findProductInvalidIds" resultType="java.lang.Integer">
-        select p.productID
-        from product p
-                 left join cm_organize_product_info copi on copi.productId = p.productId
-        where copi.validFlag not in (2, 3, 9) and copi.organizeId = 0
-           or p.productCategory != 1
+        select productID
+        from product
+        where validFlag not in (2, 3, 9)
+           or productCategory != 1
     </select>
     <select id="searchProductList" resultType="com.caimei365.commodity.model.search.ProductDO">
         select
         <include refid="Search_Product_List"/>
         from product p
         <include refid="Product_Joins"/>
-        left join cm_organize_product_info copi on copi.productId = p.productId
-        where copi.validFlag in (2,3,9) and p.productCategory = 1 and copi.organizeId = 0
-        order by p.productID desc
-    </select>
-    <select id="searchMallProductByProductId" resultType="com.caimei365.commodity.model.search.MallProductDO">
-        select m.id           as m_id,
-               m.organizeID   as m_organize_id,
-               m.productID    as m_product_id,
-               m.retailPrice  as m_price,
-               m.classifyID   as m_classify_id,
-               m.delFlag      as m_valid,
-               c.classifyName as m_classify_name
-        from cm_mall_organize_products as m
-                 left join cm_mall_products_classify as c on m.classifyId = c.id
-        where m.productID = #{productId}
-          and m.organizeID = 1
-        limit 1
-    </select>
-    <select id="getMallLadderPriceFlag" resultType="java.lang.Integer">
-        select ladderPriceFlag
-        from cm_mall_organize_products
-        where productID = #{productId}
-          and organizeID = 1
-        limit 1
-    </select>
-    <select id="getMallLowerLadderPrice" resultType="java.lang.Double">
-        select MIN(buyPrice)
-        from cm_mall_product_ladder_price
-        where delFlag = '0'
-          and productId = #{productId}
+        where p.validFlag in (2,3,9) and productCategory = 1
+        order by productID desc
     </select>
     <select id="findMallIdByProductId" resultType="java.lang.Integer">
         select id
@@ -297,10 +265,10 @@
         p.`name` as name,
         p.mainImage as image,
         br.name as brandName,
-        (select unit from cm_sku where productID=p.productID and organizeId = 0 order by price asc limit 1) as unit,
+        (select unit from cm_sku where productID=p.productID order by price asc limit 1) as unit,
         p.productCode as code,
         p.priceFlag,
-        (select price from cm_sku where productID=p.productID and organizeId = 0 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,
         p.shopID as shopId,
         p.productType,
         p.searchKey as keyword