BME learning summary 02
// Query the SQL. xml of the database
<? 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_t 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>