select t.dictype_name as type,
a.dic_name as name,
u.USERLOG_DESCRIBE as userlogDescribe,
u.updatetime as updatetime,
u.ip as ip,
decode(a.DIC_LEAVE, 0, '普通', 1, '中等',2,'严重') as leval
from pqs_userlog u ,
pqs_dicdata a ,
pqs_dictype t
where u.type=a.dic_index
and a.dic_type=t.dictype_index
order by u.updatetime desc
select t.dictype_name as type,
a.dic_name as name,
u.USERLOG_DESCRIBE as userlogDescribe,
u.updatetime as updatetime,
u.ip as ip,
decode(a.DIC_LEAVE, 0, '普通', 1, '中等',2,'严重') as leval
from pqs_userlog u ,
pqs_dicdata a ,
pqs_dictype t
where u.type=a.dic_index
and a.dic_type=t.dictype_index
and t.dictype_index like #{type}
and a.dic_index like #{name}
and to_number(to_char(u.updatetime, 'yyyyMMddHHmiss')) between #{startTime}
and #{endTime}
order by u.updatetime desc
select t.dictype_name as type,
count(1) as num
from pqs_userlog u ,
pqs_dicdata a ,
pqs_dictype t
where u.type=a.dic_index
and a.dic_type=t.dictype_index
and to_number(to_char(u.updatetime, 'yyyyMMddHHmmss')) between #{startTime}
and #{endTime}
group by t.dictype_name
select a.dic_name as name,
count(1) as num
from pqs_userlog u ,
pqs_dicdata a ,
pqs_dictype t
where u.type=a.dic_index
and a.dic_type=t.dictype_index
and to_number(to_char(u.updatetime, 'yyyyMMddHHmmss')) between #{startTime}
and #{endTime}
group by a.dic_name
select b.loginname name,
count(1) num
from pqs_userlog a,
pqs_user b
where A.USERLOG_DESCRIBE like '%'||b.loginname||'%'
and a.user_index=b.user_index
and to_number(to_char(a.updatetime, 'yyyyMMddHHmmss')) between #{startTime}
and #{endTime}
group by b.loginname
delete from pqs_userlog
where rowid = (select rowid
from (select UPDATETIME from pqs_userlog where UPDATETIME < #{endTime} order by UPDATETIME)
where rownum = 1)
delete from pqs_userlog
where UPDATETIME = (select UPDATETIME from pqs_userlog where UPDATETIME < #{endTime} order by UPDATETIME LIMIT 1 )