zoujiajian 2 жил өмнө
parent
commit
3fb7f0a44a

+ 5 - 0
netflix-dao/src/main/java/com/cyksj/model/entity/Information.java

@@ -60,6 +60,11 @@ public class Information extends BaseEntity{
      */
     private Boolean top;
 
+    /**
+     * 排序
+     */
+    private Integer sorted;
+
     /**
      * true 存在 || false 删除
      */

+ 3 - 0
netflix-dao/src/main/java/com/cyksj/model/views/InformationView.java

@@ -84,6 +84,9 @@ public class InformationView {
     @DbField("i.top")
     private Boolean top;
 
+    @DbField("i.sorted")
+    private Integer sorted;
+
     /**
      * 推荐商品id
      */

+ 1 - 1
netflix-dao/src/main/resources/mapper/InformationMapper.xml

@@ -14,7 +14,7 @@
                 and recommend is true
             </otherwise>
         </choose>
-        order by case when top is true then 1 else 2 end,created_time desc
+        order by sorted, case when top is true then 1 else 2 end,created_time desc
     </select>
 
     <select id="getInformationByTitle" resultType="com.cyksj.model.views.InformationListView">