Stringsql="select l.*, le.ext, ifnull(ifnull(u.username, m.username), a.realname) username from fc_logs l left join fc_logs_ext le on le.path = l.path left join fc_user u on u.uid = l.loginid and (l.type = 'USER' or l.type = 'user') left join fc_member m on m.id = l.loginid and (l.type = 'MEMBER' or l.type = 'member') left join fc_admin a on a.adminid = l.loginid and (l.type = 'ADMIN' or l.type = 'admin')";
Stringsql="select l.*, le.ext, ifnull(ifnull(u.username, m.username), a.realname) username from fc_logs l left join fc_logs_ext le on le.path = l.path left join fc_user u on u.uid = l.loginid and l.type = 'user' left join fc_member m on m.id = l.loginid and l.type = 'member' left join fc_admin a on a.adminid = l.loginid and l.type = 'admin'";
sql="select t.* from ("+sql+") t"+StringUtil.join(" and "," where ","","",where.getStringList())+" order by t.create_time desc";
sql="select t.* from ("+sql+") t"+StringUtil.join(" and "," where ","","",where.getStringList())+" order by t.create_time desc";