服务热线:13616026886

技术文档 欢迎使用技术文档,我们为你提供从新手到专业开发者的所有资源,你也可以通过它日益精进

位置:首页 > 技术文档 > JAVA > 新手入门 > 基础入门 > 查看文档

使用struts,ibaits和jstl开发简便通用的文件上传系统(5)


  使用struts,ibaits和jstl开发简便通用的文件上传系统(5)

<!-- =============================================
mapped-statement findbyprimarykey
============================================= -->
<mapped-statement name="findbyprimarykeyattachmentdao" result-class="java.util.hashmap">
select * from attachment
where
attachid=#attachid#
</mapped-statement>
<!-- =============================================
mapped-statement findcount
============================================= -->
<dynamic-mapped-statement name="findattachmentdaocount" result-class="java.lang.integer">
select count(1) from attachment
<dynamic prepend="where">
<ispropertyavailable prepend="and" property="attachid" >
<isnotnull prepend="" property="attachid" >
attachid=#attachid#
</isnotnull>
</ispropertyavailable>
<ispropertyavailable prepend="and" property="attachfilename" >
<isnotnull prepend="" property="attachfilename" >
attachfilename=#attachfilename#
</isnotnull>
</ispropertyavailable>
<ispropertyavailable prepend="and" property="attachfilepath" >
<isnotnull prepend="" property="attachfilepath" >
attachfilepath=#attachfilename#
</isnotnull>
</ispropertyavailable>
<ispropertyavailable prepend="and" property="attachfilesize" >
<isnotnull prepend="" property="attachfilesize" >
attachfilesize=#attachfilesize#
</isnotnull>
</ispropertyavailable>
<ispropertyavailable prepend="and" property="attachmimetype" >
<isnotnull prepend="" property="attachmimetype" >
attachmimetype=#attachmimetype#
</isnotnull>
</ispropertyavailable>
<ispropertyavailable prepend="and" property="attachdesc" >
<isnotnull prepend="" property="attachdesc" >
attachdesc=#attachdesc#
</isnotnull>
</ispropertyavailable>
<ispropertyavailable prepend="and" property="attachcreationip" >
<isnotnull prepend="" property="attachcreationip" >
attachcreationip=#attachcreationip#
</isnotnull>
</ispropertyavailable>
<ispropertyavailable prepend="and" property="attachcreationdate" >
<isnotnull prepend="" property="attachcreationdate" >
attachcreationdate=#attachcreationdate#
</isnotnull>
</ispropertyavailable>
<ispropertyavailable prepend="and" property="attachmodifieddate" >
<isnotnull prepend="" property="attachmodifieddate" >
attachmodifieddate=#attachmodifieddate#
</isnotnull>
</ispropertyavailable>
</dynamic>
</dynamic-mapped-statement>
</sql-map> (未完待续)

扫描关注微信公众号