ibatis Dynamic SQL configuration startup prompt: The content of elements must consist of well-formed character data ... Share | 2012-07-18 11:21wuming3632171 | browse 5,114 times
Ibatis configuration as follows, master to help me see.
<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>
2012-07-18 12:21
The questioner is adopted by
Just write the following expression in reverse.
C_date <= #endDate #
Switch
#endDate #
Remember: The less than sign cannot appear in the Ibatis configuration file
Ibatis Dynamic SQL Configuration startup prompt: The content of elements must consist of well-formed character data ...