Explorar el Código

fix:商品默认排序

liujunchi hace 2 años
padre
commit
6c64c6f7e8

+ 2 - 0
cooleshow-mall/mall-portal/src/main/java/com/yonge/cooleshow/portal/service/impl/PmsPortalProductServiceImpl.java

@@ -86,6 +86,8 @@ public class PmsPortalProductServiceImpl implements PmsPortalProductService {
             example.setOrderByClause("price asc");
         } else if (sort == 4) {
             example.setOrderByClause("price desc");
+        } else {
+            example.setOrderByClause("sort desc");
         }
         List<PmsProduct> pmsProducts = productMapper.selectByExample(example);
         List<Long> productIdList = pmsProducts.stream().map(PmsProduct::getId).collect(Collectors.toList());