67,512
社区成员
发帖
与我相关
我的任务
分享
最近项目老大分配了个任务,用Struts2+Spring+Mybatis完成,但是在调试时遇到下面问题 <select id="searchFlightList" parameterType="ssm.fbms.bean.FlightBean" resultType="ssm.fbms.dto.FlightDto">
select
flightid as flightId,
to_char(execdate,'yyyy-mm-dd') as execDate,
flightno as flightNo,
case when isoffin='A' then '进港' else '出港'end as isOffin,
case
when flightattr='2401' then '国际'
when flightattr='2403' then '国内'
when flightattr='2404' then '专机' end as flightAttr,
task as task,
aerocraftno as aerocraftNo,
crafttype as craftType,
to_char(startrealtakeofftime,'yyyy-mm-dd hh24:mi') as startRealTakeoffTime,
to_char(terminalreallandintime,'yyyy-mm-dd hh24:mi') as terminalRealLandinTime,
airlineshort as airlineShort,
(select cnshortname from sbd_flightstate where code = innerprovidingstate)
as innerProvidingState,
(select cnshortname from sbd_flightstate where code = innerabnormalstate)
as innerAbnormalState,
(select cnshortname from sbd_flightstate where code = intlinnerprovidingstate)
as intlInnerProvidingState,
(select cnshortname from sbd_flightstate where code = intlinnerabnormalstate)
from
SOR_FLIGHTINFO
where
execdate <![CDATA[>=]]> to_date(#{execDateStart,jdbcType=VARCHAR}, 'yyyy-mm-dd') and
execdate <![CDATA[<=]]> to_date(#{execDateEnd,jdbcType=VARCHAR}, 'yyyy-mm-dd')
<if test="isOffin != null and isOffin != ''"> and isoffin = #{isOffin}</if>
<if test="airlinesId != null and airlinesId != ''"> and airlinesid = #{airlinesId,jdbcType=NUMERIC}</if>
<if test="flightNo != null and flightNo != ''"> and flightno = #{flightNo,jdbcType=NUMERIC}</if>
<if test="task != null and task != ''"> and task = #{task,jdbcType=VARCHAR}</if>
<if test="flightAttr != null and flightAttr != ''"> and flightattr = #{flightAttr,jdbcType=VARCHAR}</if>
<if test="craftTypeId !=null and craftTypeId != ''"> and crafttypeid = #{craftTypeId,jdbcType=VARCHAR}</if>
<if test="airlineShort != null and airlineShort != ''"> and airlineshort = #{airlineShort,jdbcType=VARCHAR}</if>
</select>