<?XML version= "1.0" encoding= "UTF-8"?><!DOCTYPE Mapper Public "-//mybatis.org//dtd mapper 3.0//en" "Http://mybatis.org/dtd/mybatis-3-mapper.dtd "><Mappernamespace= "Pmexceptionmapper"> <SQLID= "Pmexceptioncolumns">exception_result_id,task_id,tags,log_level,timestamp,class_name,log_path,content</SQL> <Resultmaptype= "Pmexception"ID= "Pmexceptionmap"> <IDcolumn= "exception_result_id" Property= "exception_id" /> <resultcolumn= "task_id" Property= "TaskId" /> <resultcolumn= "TAGS" Property= "tags" /> <resultcolumn= "Log_level" Property= "LogLevel" /> <resultcolumn= "TIMESTAMP" Property= "TimeStamp" /> <resultcolumn= "Class_name" Property= "ClassName" /> <resultcolumn= "Log_path" Property= "LogPath" /> <resultcolumn= "CONTENT" Property= "Content" /> </Resultmap> <SelectID= "Pmexceptionlistpage"ParameterType= "page"Resulttype= "PD">Select Exception_result_id,tags,timestamp,e.log_path,log_level,class_name from Exception_result E,pm_task t where e.task_id= #{pd.taskid} and T.owner=#{pd.username} ORDER by E.timestamp DESC </Select> <SelectID= "Pmexceptiondetail"ParameterType= "page"Resulttype= "PD">Select CONTENT from Exception_result where EXCEPTION_RESULT_ID=#{PD. EXCEPTION_RESULT_ID}</Select> <!--list in pagination form - <SelectID= "Pmexceptionfordaylistpage"ParameterType= "page"Resulttype= "PD">SELECT * from Exception_result e,pm_task t where e.task_id =#{pd.taskid} and T.owner=#{pd.owner} and date (TIMESTAMP) =curdate () group by Tags,left (TIMESTAMP, $) Order by E.timestamp DESC</Select> <SelectID= "Listpmexceptionpageforweek"ParameterType= "page"Resulttype= "PD">SELECT * from Exception_result e,pm_task t where e.task_id =#{pd.taskid} and T.owner=#{pd.owner} and Date_sub (Curdate (), INTERVAL 7 day)<! [Cdata[<]]>= Date (TIMESTAMP) group by Tags,left (TIMESTAMP, ten) Order by E.timestamp DESC</Select> <SelectID= "Chartsformonth"ParameterType= "page"Resulttype= "PD">Select Tags,count (TAGS) as Exception_count,timestamp from Exception_result e,pm_task t wh Ere e.task_id=#{pd.taskid} and T.owner=#{pd.username} and date (TIMESTAMP)<! [Cdata[>]]>= Date_sub (Curdate (), INTERVAL) group by Tags,left (TIMESTAMP, ten) Order by TAGS DE SC; </Select></Mapper>
Pmexceptionmapper.xml 20160712