8,906
社区成员
发帖
与我相关
我的任务
分享
<!-- 根据条件查询分页 -->
<select id="queryByPage" parameterType="Map" resultType="TblCdOrdLog">
SELECT * FROM (SELECT T1.*, ROWNUM LINENUM FROM (
select
t.SYS_SEQ_ID as sysSeqId,
t.SYS_DATE as sysDateStr,
t.SYS_TIME as sysTimeStr,
t.FUSION_SYS_ID as fusionSysId,
t.SC_ORD_ID as scOrdId,
t.SC_DATE as scDateStr,
t.SC_TIME as scTimeStr,
t.SC_CODE as scCode,
t.SUB_PC_CODE as subPcCode,
t.PAY_AMT as payAmt,
t.CURRENCY as currency,
t.ORD_STATUS as ordStatus,
t.PC_CODE as pcCode,
t.SUB_PC_CODE as subPcCode,
t.PNR_NO as pnrNo,
t.PAGE_RETURN_URL as pageReturnUrl,
t.NOTIFY_URL as notifyUrl,
t.REMARK as remark,
t.IP_ADDRESS as ipAddress,
t.SESSION_ID as sessionId,
t.USER_GUIDE as userGuide,
t.ORDER_CHANNEL as orderChannel,
t.TEAM_NO as teamNo,
t.SIGN_TYPE as signType,
t.RESV1 as resv1,
t.RESV2 as resv2,
t.RESV3 as resv3,
t.RESV4 as resv4,
t.RESV5 as resv5,
t.RESV6 as resv6
FROM TBL_CD_ORD_LOG t
WHERE 1=1
<if test="cdOrdLogVo.sysSeqId!=null and cdOrdLogVo.sysSeqId != ''">
and t.SYS_SEQ_ID = #{cdOrdLogVo.sysSeqId}
</if>
<if test="cdOrdLogVo.fusionSysId!=null and cdOrdLogVo.fusionSysId != ''">
and t.FUSION_SYS_ID = #{cdOrdLogVo.fusionSysId}
</if>
<if test="cdOrdLogVo.pnrNo!=null and cdOrdLogVo.pnrNo != ''">
and t.PNR_NO = #{cdOrdLogVo.pnrNo}
</if>
<if test="cdOrdLogVo.scCode!=null and cdOrdLogVo.scCode != ''">
and t.SC_CODE = #{cdOrdLogVo.scCode}
</if>
<if test="cdOrdLogVo.subScCode!=null and cdOrdLogVo.subScCode != ''">
and t.SUB_SC_CODE = #{cdOrdLogVo.subScCode}
</if>
<if test="cdOrdLogVo.ordStatus!=null and cdOrdLogVo.ordStatus != ''">
and t.ORD_STATUS = #{cdOrdLogVo.ordStatus}
</if>
<if test="cdOrdLogVo.scOrdId!=null and cdOrdLogVo.scOrdId != ''">
and t.SC_ORD_ID = #{cdOrdLogVo.scOrdId}
</if>
<if test="cdOrdLogVo.scOrdId!=null and cdOrdLogVo.scOrdId != ''">
and t.PC_CODE = #{cdOrdLogVo.pcCode}
</if>
<if test="cdOrdLogVo.subPcCode!=null and cdOrdLogVo.subPcCode != ''">
and t.SUB_PC_CODE = #{cdOrdLogVo.subPcCode}
</if>
<if test="cdOrdLogVo.dateType != null and cdOrdLogVo.dateType != '' and cdOrdLogVo.dateType == '1' ">
<if test="cdOrdLogVo.beginDate != null and cdOrdLogVo.beginDate != ''">
and t.sys_date >= #{cdOrdLogVo.beginDate}
</if>
<if test="cdOrdLogVo.endDate != null and cdOrdLogVo.endDate != ''">
and t.sys_date < #{cdOrdLogVo.endDate}
</if>
</if>
<if test="cdOrdLogVo.dateType != null and cdOrdLogVo.dateType != '' and cdOrdLogVo.dateType == '2' ">
<if test="cdOrdLogVo.beginDate != null and cdOrdLogVo.beginDate != ''">
and t.sc_date >= #{cdOrdLogVo.beginDate}
</if>
<if test="cdOrdLogVo.endDate != null and cdOrdLogVo.endDate != ''">
AND t.sc_date < #{cdOrdLogVo.endDate}
</if>
</if>
ORDER BY t.SYS_DATE desc
) T1 WHERE ROWNUM <= #{endRow}) T2 WHERE LINENUM >= #{beginRow}
</select>