|
|
|
@ -43,30 +43,37 @@ |
|
|
|
|
AND c.is_disable = #{req.isDisable} |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<if test="req.modifiedTimeSort ==0"> |
|
|
|
|
<choose> |
|
|
|
|
<when test="req.modifiedTimeSort ==0"> |
|
|
|
|
ORDER BY c.update_time desc |
|
|
|
|
</if> |
|
|
|
|
</when> |
|
|
|
|
|
|
|
|
|
<if test="req.modifiedTimeSort ==1"> |
|
|
|
|
<when test="req.modifiedTimeSort ==1"> |
|
|
|
|
ORDER BY c.update_time asc |
|
|
|
|
</if> |
|
|
|
|
</when> |
|
|
|
|
|
|
|
|
|
<if test="req.publicationTimeSort ==0"> |
|
|
|
|
<when test="req.publicationTimeSort ==0"> |
|
|
|
|
ORDER BY c.release_time desc |
|
|
|
|
</if> |
|
|
|
|
</when> |
|
|
|
|
|
|
|
|
|
<if test="req.publicationTimeSort ==1"> |
|
|
|
|
<when test="req.publicationTimeSort ==1"> |
|
|
|
|
ORDER BY c.release_time asc |
|
|
|
|
</if> |
|
|
|
|
</when> |
|
|
|
|
|
|
|
|
|
<if test="req.topSort ==0"> |
|
|
|
|
<when test="req.topSort ==0"> |
|
|
|
|
ORDER BY is_top asc |
|
|
|
|
</if> |
|
|
|
|
</when> |
|
|
|
|
|
|
|
|
|
<if test="req.topSort ==1"> |
|
|
|
|
<when test="req.topSort ==1"> |
|
|
|
|
ORDER BY is_top desc |
|
|
|
|
</if> |
|
|
|
|
</when> |
|
|
|
|
|
|
|
|
|
<otherwise> |
|
|
|
|
ORDER BY |
|
|
|
|
release_time DESC, |
|
|
|
|
create_time DESC |
|
|
|
|
</otherwise> |
|
|
|
|
</choose> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
@ -167,11 +174,16 @@ |
|
|
|
|
sys_content c |
|
|
|
|
WHERE |
|
|
|
|
deleted = 1 |
|
|
|
|
AND site_id = 1 |
|
|
|
|
AND site_id = #{req.siteId} |
|
|
|
|
<if test="req.title != null and req.title != ''"> |
|
|
|
|
AND title LIKE |
|
|
|
|
CONCAT('%',#{req.title},'%') |
|
|
|
|
</if> |
|
|
|
|
ORDER BY |
|
|
|
|
is_top = 1 DESC, |
|
|
|
|
top_time DESC, |
|
|
|
|
release_time DESC, |
|
|
|
|
create_time DESC |
|
|
|
|
</select> |
|
|
|
|
<select id="columnConditionsFilterArticles" resultType="com.huoran.iasf.vo.resp.PageContentRespVO"> |
|
|
|
|
SELECT t.*, |
|
|
|
@ -191,13 +203,11 @@ |
|
|
|
|
AND is_release = 1) t |
|
|
|
|
WHERE FIND_IN_SET(t.column_id, #{columnId}) |
|
|
|
|
|
|
|
|
|
ORDER BY |
|
|
|
|
is_top = 1 DESC, |
|
|
|
|
ORDER BY is_top = 1 DESC, |
|
|
|
|
top_time DESC, |
|
|
|
|
release_time DESC, |
|
|
|
|
create_time DESC |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper> |