Commit 0c31b453 by 吴迪

【修改】sql 排序

parent 0b141412
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</if> </if>
<choose> <choose>
<when test="newsParams.sidx!=null and newsParams.sidx!=''"> <when test="newsParams.sidx!=null and newsParams.sidx!=''">
ORDER BY a.${newsParams.sidx} ${newsParams.order}, ORDER BY a.${newsParams.sidx} ${newsParams.order}
</when> </when>
<otherwise> <otherwise>
ORDER BY a.id DESC ORDER BY a.id DESC
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</if> </if>
<choose> <choose>
<when test="newsParams.sidx!=null and newsParams.sidx!=''"> <when test="newsParams.sidx!=null and newsParams.sidx!=''">
ORDER BY t.${newsParams.sidx} ${newsParams.order}, ORDER BY t.${newsParams.sidx} ${newsParams.order}
</when> </when>
<otherwise> <otherwise>
ORDER BY t.id DESC ORDER BY t.id DESC
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</choose> </choose>
<choose> <choose>
<when test="newsParams.sidx!=null and newsParams.sidx!=''"> <when test="newsParams.sidx!=null and newsParams.sidx!=''">
ORDER BY ${newsParams.sidx} ${newsParams.order}, ORDER BY ${newsParams.sidx} ${newsParams.order}
</when> </when>
<otherwise> <otherwise>
order by id desc order by id desc
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</if> </if>
<choose> <choose>
<when test="params.sidx!=null and params.sidx!=''"> <when test="params.sidx!=null and params.sidx!=''">
ORDER BY t.${params.sidx} ${params.order}, ORDER BY t.${params.sidx} ${params.order}
</when> </when>
<otherwise> <otherwise>
order by id desc order by id desc
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</choose> </choose>
<choose> <choose>
<when test="indexCarouselManage.sidx!=null and indexCarouselManage.sidx!=''"> <when test="indexCarouselManage.sidx!=null and indexCarouselManage.sidx!=''">
ORDER BY ${indexCarouselManage.sidx} ${indexCarouselManage.order}, ORDER BY ${indexCarouselManage.sidx} ${indexCarouselManage.order}
</when> </when>
<otherwise> <otherwise>
ORDER BY t.levels desc,t.starttime_index DESC,t.id desc ORDER BY t.levels desc,t.starttime_index DESC,t.id desc
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</if> </if>
<choose> <choose>
<when test="newsParams.sidx!=null and newsParams.sidx!=''"> <when test="newsParams.sidx!=null and newsParams.sidx!=''">
ORDER BY ${newsParams.sidx} ${newsParams.order}, ORDER BY ${newsParams.sidx} ${newsParams.order}
</when> </when>
<otherwise> <otherwise>
ORDER BY ORDER BY
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
</if> </if>
<choose> <choose>
<when test="newsParams.sidx!=null and newsParams.sidx!=''"> <when test="newsParams.sidx!=null and newsParams.sidx!=''">
ORDER BY ${newsParams.sidx} ${newsParams.order}, ORDER BY ${newsParams.sidx} ${newsParams.order}
</when> </when>
<otherwise> <otherwise>
ORDER BY id desc ORDER BY id desc
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
</choose> </choose>
<choose> <choose>
<when test="params.sidx!=null and params.sidx!=''"> <when test="params.sidx!=null and params.sidx!=''">
ORDER BY ${params.sidx} ${params.order}, ORDER BY ${params.sidx} ${params.order}
</when> </when>
<otherwise> <otherwise>
ORDER BY releasedate desc ORDER BY releasedate desc
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</if> </if>
<choose> <choose>
<when test="newsParams.sidx!=null and newsParams.sidx!=''"> <when test="newsParams.sidx!=null and newsParams.sidx!=''">
ORDER BY ${newsParams.sidx} ${newsParams.order}, ORDER BY ${newsParams.sidx} ${newsParams.order}
</when> </when>
<otherwise> <otherwise>
order by id desc order by id desc
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</choose> </choose>
<choose> <choose>
<when test="params.sidx!=null and params.sidx!=''"> <when test="params.sidx!=null and params.sidx!=''">
ORDER BY ${params.sidx} ${params.order}, ORDER BY ${params.sidx} ${params.order}
</when> </when>
<otherwise> <otherwise>
ORDER BY pictureID DESC ORDER BY pictureID DESC
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</choose> </choose>
<choose> <choose>
<when test="newsParams.sidx!=null and newsParams.sidx!=''"> <when test="newsParams.sidx!=null and newsParams.sidx!=''">
ORDER BY ${newsParams.sidx} ${newsParams.order}, ORDER BY ${newsParams.sidx} ${newsParams.order}
</when> </when>
<otherwise> <otherwise>
order by id desc order by id desc
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</if> </if>
<choose> <choose>
<when test="params.sidx!=null and params.sidx!=''"> <when test="params.sidx!=null and params.sidx!=''">
ORDER BY a.${params.sidx} ${params.order}, ORDER BY a.${params.sidx} ${params.order}
</when> </when>
<otherwise> <otherwise>
order by a.id desc order by a.id desc
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
</choose> </choose>
<choose> <choose>
<when test="params.sidx!=null and params.sidx!=''"> <when test="params.sidx!=null and params.sidx!=''">
ORDER BY ${params.sidx} ${params.order}, ORDER BY ${params.sidx} ${params.order}
</when> </when>
<otherwise> <otherwise>
ORDER BY ORDER BY
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</choose> </choose>
<choose> <choose>
<when test="newsParams.sidx!=null and newsParams.sidx!=''"> <when test="newsParams.sidx!=null and newsParams.sidx!=''">
ORDER BY b.${newsParams.sidx} ${newsParams.order}, ORDER BY b.${newsParams.sidx} ${newsParams.order}
</when> </when>
<otherwise> <otherwise>
order by b.levels desc,b.releasedate desc order by b.levels desc,b.releasedate desc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment