|
|
@@ -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>
|