<!-- 测试用 -->
<insert id="addCdnOrder" parameterClass="CdnOrder">
<![CDATA[
insert into cdn_order (user_id,channel,source_ip,domain_reg,max_bandwidth,region_list,max_file_size,
avg_file_size,content_type,file_total_number,file_total_store_size,file_increase_ratio,file_invalid_time,icp_info,comment_info,note_info)
values(#userId#,#channel#,#sourceIp#
]]>
<isEmpty prepend="," property="domainReg">
"0"
</isEmpty>
<isNotEmpty prepend="," property="domainReg">
#domainReg#
</isNotEmpty>
<isNull prepend="," property="maxBandwidth">
0.000
</isNull>
<isNotNull prepend="," property="maxBandwidth">
#maxBandwidth#
</isNotNull>
<isEmpty prepend="," property="regionList">
"0"
</isEmpty>
<isNotEmpty prepend="," property="regionList">
#regionList#
</isNotEmpty>
<isNull prepend="," property="maxFileSize">
0.000
</isNull>
<isNotNull prepend="," property="maxFileSize">
#maxFileSize#
</isNotNull>
<isNull prepend="," property="avgFileSize">
0.000
</isNull>
<isNotNull prepend="," property="avgFileSize">
#avgFileSize#
</isNotNull>
<isNull prepend="," property="contentType">
1
</isNull>
<isNotNull prepend="," property="contentType">
#contentType#
</isNotNull>
<isNull prepend="," property="fileTotalNumber">
0.000
</isNull>
<isNotNull prepend="," property="fileTotalNumber">
#fileTotalNumber#
</isNotNull>
<isNull prepend="," property="fileTotalStoreSize">
0.000
</isNull>
<isNotNull prepend="," property="fileTotalStoreSize">
#fileTotalStoreSize#
</isNotNull>
<isNull prepend="," property="fileIncreaseRatio">
0.000
</isNull>
<isNotNull prepend="," property="fileIncreaseRatio">
#fileIncreaseRatio#
</isNotNull>
<isNull prepend="," property="fileInvalidTime">
0.000
</isNull>
<isNotNull prepend="," property="fileInvalidTime">
#fileInvalidTime#
</isNotNull>
<isEmpty prepend="," property="icpInfo">
"0"
</isEmpty>
<isNotEmpty prepend="," property="icpInfo">
#icpInfo#
</isNotEmpty>
<isEmpty prepend="," property="commentInfo">
"0"
</isEmpty>
<isNotEmpty prepend="," property="commentInfo">
#commentInfo#
</isNotEmpty>
<isEmpty prepend="," property="noteInfo">
"0"
</isEmpty>
<isNotEmpty prepend="," property="noteInfo">
#noteInfo#
</isNotEmpty>
<![CDATA[
)
]]>
</insert>
ibatis insert 带有默认值
最新推荐文章于 2021-03-12 13:33:30 发布