<select id="getLimitPage" resultMap="limitFieldBeanSubMap" parameterClass="LimitField" >
<include refid="be_fy"/>
select T_LIMIT_FIELD.*,
(
case state
when ‘N‘ then ‘下线‘
when ‘Y‘ then ‘上线‘
end
) as stateStr
from T_LIMIT_FIELD where IS_DELETE=‘N‘
<include refid="whereLimitList" />
order by ADD_TIME desc
<include refid="ed_fy"/>
</select>
原文:http://www.cnblogs.com/wangchuanfu/p/6882749.html