未明确定义列

吾身为剑所成 2017-09-08 05:35:00

<!-- 根据条件查询分页 -->
<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>





### SQL: 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 ORDER BY t.SYS_DATE desc ) T1 WHERE ROWNUM <= ?) T2 WHERE LINENUM >= ?
### Cause: java.sql.SQLSyntaxErrorException: ORA-00918: 未明确定义列

; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00918: 未明确定义列
...全文
530 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
吾身为剑所成 2017-09-08
  • 打赏
  • 举报
回复
报 未明确定义列 哪里错了? 查询条件在另一个SQL里正常运行,放在这个分页框里就报错了

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧