Commit 72e731d9 authored by hezhen's avatar hezhen

Merge branch 'master-chw' into dev-chw

parents 7837591c 08f7c785
......@@ -32,7 +32,28 @@
</resultMap>
<select id="getAllByPage" resultType="com.xxfc.platform.activity.vo.ActivityVo" parameterType="com.xxfc.platform.activity.dto.ActivityDTO">
select a.*,t.name as typeName from `activity` a
select
a.*,
t.name as typeName,
(
CASE
WHEN a.end_time >=#{time} THEN
a.end_time -#{time}
ELSE
0
END
) AS orderSort ,
( CASE
WHEN a.start_time &lt;= #{time} and a.end_time > #{time} THEN
2
WHEN a.start_time > #{time} THEN
1
ELSE
3
END
) AS activityStatus
from `activity` a
LEFT JOIN activity_type t on a.type=t.type
<where>
a.is_del = 0
......@@ -59,6 +80,6 @@
]]>
</if>
</where>
order by a.`crt_time` desc
ORDER BY activityStatus,sign(orderSort)DESC,ABS(orderSort)
</select>
</mapper>
\ No newline at end of file
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