Browse Source

站内消息

Duan_xu 2 years ago
parent
commit
7c27dec5a3
1 changed files with 13 additions and 5 deletions
  1. 13 5
      src/main/resources/mapper/PageMapper.xml

+ 13 - 5
src/main/resources/mapper/PageMapper.xml

@@ -827,6 +827,7 @@
                 </foreach>
                 </foreach>
             </if>
             </if>
         </where>
         </where>
+        order by p.sortIndex desc
     </select>
     </select>
 
 
     <select id="getNewFloor" resultType="com.caimei365.commodity.model.vo.ProductItemVo">
     <select id="getNewFloor" resultType="com.caimei365.commodity.model.vo.ProductItemVo">
@@ -871,17 +872,24 @@
             and p.newProductType=1
             and p.newProductType=1
             and p.validFlag = 2
             and p.validFlag = 2
         </where>
         </where>
-
-        #         order by p.combinationSort != 0 desc, p.combinationSort asc
-
-        order by p.sortIndex desc
+        <if test="sortIndex==1000">
+            ORDER BY p.newshowTime DESC
+        </if>
+        <if test="sortIndex!=1000">
+            order by p.sortIndex desc
+        </if>
 
 
     </select>
     </select>
 
 
     <select id="getNewFloorBrand" resultType="com.caimei365.commodity.model.vo.BrandVo">
     <select id="getNewFloorBrand" resultType="com.caimei365.commodity.model.vo.BrandVo">
         SELECT DISTINCT s.`id`,s.`name` FROM product a
         SELECT DISTINCT s.`id`,s.`name` FROM product a
         LEFT JOIN `cm_brand` s ON s.id = a.brandID
         LEFT JOIN `cm_brand` s ON s.id = a.brandID
-        WHERE  a.newvalidFlag = 1
+          AND a.newvalidFlag = 1
+          AND a.newProductType=1
+          AND a.validFlag = 2
+          AND a.showFlag!=2
+          AND s.id IS NOT NULL
+          AND s.name IS NOT NULL
           AND s.id IS NOT NULL
           AND s.id IS NOT NULL
           AND s.name IS NOT NULL
           AND s.name IS NOT NULL