Commit 1311b19e by 宋珺琪

数据表统计 倒序排序(重庆)

parent 6072904b
......@@ -43,40 +43,40 @@ public class DatabaseController {
// ("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and (TABLE_NAME like 'sk%' or TABLE_NAME like 'ksh%') ")
try
{
stmt = connect.createStatement();
if (!StringUtil.isEmpty(type) && StringUtil.isEmpty(table) && type.equals("sk")){
//sk 列表
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like 'sk%' ");
}else if (!StringUtil.isEmpty(type) && StringUtil.isEmpty(table) && type.equals("ksh")){
//ksh 列表
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like 'ksh%' ");
}else if (!StringUtil.isEmpty(type) && StringUtil.isEmpty(table) && type.equals("xz")){
//xz 列表
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and (TABLE_NAME not like 'sk%' and TABLE_NAME not like 'ksh%') ");
}else if (!StringUtil.isEmpty(type) && !StringUtil.isEmpty(table) && type.equals("sk")){
//sk 模糊
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%' and TABLE_NAME like 'sk%' ");
}else if (!StringUtil.isEmpty(type) && !StringUtil.isEmpty(table) && type.equals("ksh")){
//ksh 模糊
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%'and TABLE_NAME like 'ksh%' ");
}else if (!StringUtil.isEmpty(type) && !StringUtil.isEmpty(table) && type.equals("xz")){
//xz 模糊
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%'and (TABLE_NAME not like 'sk%' and TABLE_NAME not like 'ksh%') ");
} else if (StringUtil.isEmpty(type)&& StringUtil.isEmpty(table)){
//查询所有的
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' ");//limit " + page + ","+pageSize+"
}else if(StringUtil.isEmpty(type)&& !StringUtil.isEmpty(table)){
// 模糊查询
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%'");
}
stmt = connect.createStatement();
if (!StringUtil.isEmpty(type) && StringUtil.isEmpty(table) && type.equals("sk")){
//sk 列表
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like 'sk%' ORDER BY CREATE_TIME DESC");
}else if (!StringUtil.isEmpty(type) && StringUtil.isEmpty(table) && type.equals("ksh")){
//ksh 列表
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like 'ksh%' ORDER BY CREATE_TIME DESC ");
}else if (!StringUtil.isEmpty(type) && StringUtil.isEmpty(table) && type.equals("xz")){
//xz 列表
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and (TABLE_NAME not like 'sk%' and TABLE_NAME not like 'ksh%') ORDER BY CREATE_TIME DESC ");
}else if (!StringUtil.isEmpty(type) && !StringUtil.isEmpty(table) && type.equals("sk")){
//sk 模糊
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%' and TABLE_NAME like 'sk%' ORDER BY CREATE_TIME DESC");
}else if (!StringUtil.isEmpty(type) && !StringUtil.isEmpty(table) && type.equals("ksh")){
//ksh 模糊
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%'and TABLE_NAME like 'ksh%' ORDER BY CREATE_TIME DESC");
}else if (!StringUtil.isEmpty(type) && !StringUtil.isEmpty(table) && type.equals("xz")){
//xz 模糊
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%'and (TABLE_NAME not like 'sk%' and TABLE_NAME not like 'ksh%' ORDER BY CREATE_TIME DESC) ");
} else if (StringUtil.isEmpty(type)&& StringUtil.isEmpty(table)){
//查询所有的
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' ORDER BY CREATE_TIME DESC ");//limit " + page + ","+pageSize+"
}else if(StringUtil.isEmpty(type)&& !StringUtil.isEmpty(table)){
// 模糊查询
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%' ORDER BY CREATE_TIME DESC");
}
while (rs.next())
{
Map<Object, Object> map = new HashMap<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment