<?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" >
<mapper namespace="com.chinacreator.video.mapper.TestCapAopLogDao" >
	<select id="getCapAopLogInfo" parameterType="string"  resultType="java.util.Map" >
        <![CDATA[

		select * from (
		select inserttime,inparams,outparams from (
        select inserttime,inparams,outparams from tl_cap_inout_params
		where userid=#{userid} and cpid=#{cpid} and spid=#{spid}
		and type='ORDER'
        order by inserttime desc) where rownum<4
        union all
        select inserttime,param inparams,result outparams from (
        select inserttime,param,result from  TL_AOP_ORDER_LOG
        where  user_id=#{userid} and cp_id=#{cpid} and sp_id=#{spid}
        order by inserttime desc) where rownum<4 )

        ]]>

    </select>
</mapper>

