ibatis动态sql配置启动时提示:The content of elements must consist of well-formed character data...
ibatis配置如下,高手帮我看看。<selectid="exportRecieveData"parameterClass="java.util.HashMap"resu...
ibatis配置如下,高手帮我看看。
<select id="exportRecieveData" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT L_SERIALNO as serialno,
C_CONTENT as content,
C_MOBILENO as mobileno,
C_DATE as cdate,
C_TIME as ctime,
C_FUNDACCO as fundacco,
L_BACKID as backid,
C_TASKCODE as taskcode,
C_BACK as back,
C_BACKCONTENT as backcontent,
C_BACKDATE as backdate,
C_BACKTIME as backtime,
c_pipe as l_type
FROM TSMS_RECEIVE
<dynamic prepend="where">
<isPropertyAvailable property="taskCode">
<isNotEmpty prepend="and" property="taskCode">
C_TASKCODE =#taskCode#
</isNotEmpty>
</isPropertyAvailable>
<isPropertyAvailable property="startDate">
<isNotEmpty prepend="and" property="startDate">
C_DATE >= #startDate#
</isNotEmpty>
</isPropertyAvailable>
<isPropertyAvailable property="endDate">
<isNotEmpty prepend="and" property="endDate">
C_DATE <= #endDate#
</isNotEmpty>
</isPropertyAvailable>
<isPropertyAvailable property="mobileNo">
<isNotEmpty prepend="and" property="mobileNo">
C_MOBILENO = #mobileNo#
</isNotEmpty>
</isPropertyAvailable>
<isPropertyAvailable property="fundAcco">
<isNotEmpty prepend="and" property="fundAcco">
C_FUNDACCO = #fundAcco#
</isNotEmpty>
</isPropertyAvailable>
</dynamic>
</select> 展开
<select id="exportRecieveData" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT L_SERIALNO as serialno,
C_CONTENT as content,
C_MOBILENO as mobileno,
C_DATE as cdate,
C_TIME as ctime,
C_FUNDACCO as fundacco,
L_BACKID as backid,
C_TASKCODE as taskcode,
C_BACK as back,
C_BACKCONTENT as backcontent,
C_BACKDATE as backdate,
C_BACKTIME as backtime,
c_pipe as l_type
FROM TSMS_RECEIVE
<dynamic prepend="where">
<isPropertyAvailable property="taskCode">
<isNotEmpty prepend="and" property="taskCode">
C_TASKCODE =#taskCode#
</isNotEmpty>
</isPropertyAvailable>
<isPropertyAvailable property="startDate">
<isNotEmpty prepend="and" property="startDate">
C_DATE >= #startDate#
</isNotEmpty>
</isPropertyAvailable>
<isPropertyAvailable property="endDate">
<isNotEmpty prepend="and" property="endDate">
C_DATE <= #endDate#
</isNotEmpty>
</isPropertyAvailable>
<isPropertyAvailable property="mobileNo">
<isNotEmpty prepend="and" property="mobileNo">
C_MOBILENO = #mobileNo#
</isNotEmpty>
</isPropertyAvailable>
<isPropertyAvailable property="fundAcco">
<isNotEmpty prepend="and" property="fundAcco">
C_FUNDACCO = #fundAcco#
</isNotEmpty>
</isPropertyAvailable>
</dynamic>
</select> 展开
威孚半导体技术
2024-08-19 广告
2024-08-19 广告
威孚(苏州)半导体技术有限公司是一家专注生产、研发、销售晶圆传输设备整机模块(EFEM/SORTER)及核心零部件的高科技半导体公司。公司核心团队均拥有多年半导体行业从业经验,其中技术团队成员博士、硕士学历占比80%以上,依托丰富的软件底层...
点击进入详情页
本回答由威孚半导体技术提供
展开全部
把下面这个表达式反过来写就可以了
<isNotEmpty prepend="and" property="endDate">
C_DATE <= #endDate#
</isNotEmpty>
改为
<isNotEmpty prepend="and" property="endDate">
#endDate# >= C_DATE
</isNotEmpty>
记住:在ibatis的配置文件中不能出现小于号
<isNotEmpty prepend="and" property="endDate">
C_DATE <= #endDate#
</isNotEmpty>
改为
<isNotEmpty prepend="and" property="endDate">
#endDate# >= C_DATE
</isNotEmpty>
记住:在ibatis的配置文件中不能出现小于号
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询