码迷,mamicode.com
首页 > 其他好文 > 详细

BME学习总结02

时间:2014-08-04 01:46:16      阅读:443      评论:0      收藏:0      [点我收藏+]

标签:des   blog   http   os   io   数据   ar   数据库   

BME学习总结02

//查询数据库的SQL.XML
<?xml version="1.0" encoding="UTF-8"?>
<sqlmap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.huawei.com/bme/schema/namingsql">
<resultMapping id="ParamMaps"
type="com.huawei.bme.entity.EsbLogUserOperEntity">
<result property="oper_id" column="OPER_ID" />
<result property="user_name" column="USER_NAME" />
<result property="role_id" column="ROLE_ID" />
<result property="user_host" column="USER_HOST" />
<result property="oper_type" column="OPER_TYPE" />
<result property="oper_object_type" column="OPER_OBJECT_TYPE" />
<result property="oper_object_name" column="OPER_OBJECT_NAME" />
<result property="oper_context" column="OPERCCONTEXT" />
<result property="oper_time" column="OPER_TIME" />
<result property="oper_result" column="OPER_RESULT" />
</resultMapping>
<sql id="QueryEsbLogByParams" datasource="bmeDataSource"
resultMapping="ParamMaps" parameterType="com.huawei.bme.entity.EsbLogUserOperEntity">
<content>
<![CDATA[
    select * from ESB_LOG_USER_OPER t  where  <{tune1}> <{tune2}> <{tune3}> <{tune4}> <{tune5}> order by OPER_ID desc
    ]]>
</content>
<tune-table>
<tune id="tune1">
<tune-value content="t.USER_NAME like :user_name"
condition=":user_name isNotNull" prepend="and" />
</tune>

<tune id="tune2">
<tune-value content="and t.OPER_TYPE =per_type"
condition=":oper_type isNotNull" prepend="and" />
</tune>

<tune id="tune3">
<tune-value content="and t.OPER_RESULT =per_result"
condition=":oper_result isNotNull" prepend="and" />
</tune>

<tune id="tune4">
<tune-value content="and t.OPER_OBJECT_TYPE =:oper_object_type"
condition=":oper_object_type isNotNull" prepend="and" />
</tune>

<tune id="tune5">
<tune-value
content="and t.OPER_TIME between to_date(:begin_time,‘YYYY/MM/DD HH24:mi:ss‘)
and to_date(:end_time,‘YYYY/MM/DD HH24:mi:ss‘)"
condition=":begin_time isNotNull and :end_time isNotNull" prepend="and" />
</tune>

</tune-table>
</sql>
</sqlmap>

BME学习总结02,布布扣,bubuko.com

BME学习总结02

标签:des   blog   http   os   io   数据   ar   数据库   

原文地址:http://www.cnblogs.com/beyondaotian/p/3889097.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!