**mybatis中如果使用的字段是oracle的关键字,会出现错误
解决方式是
可以使用resultMap**
<!-- 预约日历用 -->
<resultMap id="FullDateResultMap" type="com.haier.hrssc.reserveschedual.dto.FullcalendaDTO">
<id property="id" column="id"/>
<result property="title" column="title"/>
<result property="start" column="startTime"/>
<result property="end" column="endTime"/>
<result property="allDay" column="allDay"/>
<result property="color" column="color"/>
</resultMap>
<!-- 获取主键 -->
<!-- 查询预约日历 -->
<select id="getFullcalender" parameterType="com.haier.hrssc.reserveschedual.dto.FullcalendaDTO" resultMap="FullDateResultMap">
<![CDATA[
SELECT
c.ID AS id,
c.TITLE AS title,
c.COLOR AS color,
DECODE (
c.ALLDAY,
0,
'false',
1,
'true',
'false'
) AS allDay,
c.STARTTIME AS startTime,
c.ENDTIME AS endTime
FROM
T_SSC_CALENDAR c
WHERE
((c.status = '1' or c.status = #{status,jdbcType=VARCHAR})
and
c.EMPSN = #{empSn,jdbcType=VARCHAR})
or
(c.EMPSN is Null and c.status = '1')
and to_date(c.STARTTIME,'yyyy-MM-dd') between to_date(#{start,jdbcType=VARCHAR},'yyyy-MM-dd') and to_date(#{end,jdbcType=VARCHAR},'yyyy-MM-dd')
]]>
</select>