Parcourir la source

fix 去掉置顶

zoujiajian il y a 3 ans
Parent
commit
51a91c72a6

+ 2 - 0
netflix-dao/src/main/java/com/cyksj/model/entity/HelpQuestionClassification.java

@@ -20,6 +20,8 @@ public class HelpQuestionClassification extends BaseEntity{
 
 	private Integer sort;
 
+	private String content;
+
 	private Boolean status;
 
 	private Boolean deleted;

+ 2 - 0
netflix-dao/src/main/java/com/cyksj/model/views/HelpQuestionClassificationView.java

@@ -24,6 +24,8 @@ public class HelpQuestionClassificationView {
 
 	private String logo;
 
+	private String content;
+
 	private Integer sort;
 
 	private List<HelpQuestion> questions;

+ 6 - 10
netflix-dao/src/main/resources/mapper/HelpQuestionClassificationMapper.xml

@@ -8,19 +8,15 @@
                hc.name,
                hc.goods_id,
                hc.sort,
-               if(gd.id is null, hc.logo,gd.logo) as logo
+               hc.content,
+        if(gd.id is null, hc.logo,gd.logo) as logo
         from `help_question_classification` hc left join `goods_don` gd
         on gd.id = hc.goods_id
+        where hc.deleted is true
+          and hc.status is true
         <if test="goodsId != null">
-            and hc.goods_id = #{goodsId}
-        </if>
-        where hc.deleted is true and hc.status is true
-        <if test="goodsId != null">
-            order by case when hc.goods_id = #{goodsId} then (select max(sort) from `help_question_classification` where
-            deleted is true and status is true)+1 else sort end desc
-        </if>
-        <if test="goodsId == null">
-            order by sort desc
+          and hc.goods_id = #{goodsId}
         </if>
+        order by sort desc
     </select>
 </mapper>