Ver código fonte

查询新增3随机获取文章

fangqing 5 meses atrás
pai
commit
90ca35147f

+ 3 - 0
ruoyi-generator/src/main/resources/mapper/community/ArticleMapper.xml

@@ -214,6 +214,9 @@
         <if test="searchType == 2">
             order by a.page_views desc
         </if>
+        <if test="searchType == 3">
+            order by RAND()
+        </if>
         limit #{offset},#{limit}
     </select>