Procházet zdrojové kódy

fix: 商品排序的问题

xdd před 1 měsícem
rodič
revize
acf1915b90

+ 5 - 5
fs-service-system/src/main/java/com/fs/store/mapper/FsStoreProductMapper.java

@@ -166,15 +166,15 @@ public interface FsStoreProductMapper
     @Update("update fs_store_product set stock=stock+#{num}, sales=sales-#{num}" +
             " where product_id=#{productId}")
     int incStockDecSales( @Param("num")Long num, @Param("productId")Long productId);
-    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_new=1 and is_display=1 order by sort desc limit #{count}")
+    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_new=1 and is_display=1 order by sort desc, product_id DESC limit #{count}")
     List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(int count);
-    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_hot=1 and is_display=1 order by sort desc limit #{count}")
+    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_hot=1 and is_display=1 order by sort desc, product_id DESC limit #{count}")
     List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(int count);
-    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_good=1 and is_display=1 order by sort desc limit #{count}")
+    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_good=1 and is_display=1 order by sort desc, product_id DESC limit #{count}")
     List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count);
-    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_best=1 and is_display=1 order by sort desc")
+    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_best=1 and is_display=1 order by sort desc, product_id DESC")
     List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery();
-    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_good=1 and is_display=1 order by sort desc")
+    @Select("select * from fs_store_product where is_del=0 and is_show=1 and  is_good=1 and is_display=1 order by sort desc, product_id DESC")
     List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery();
     @Select({"<script> " +
             "select count(1) from fs_store_product  " +