commit
b64e86a456
|
@ -155,4 +155,10 @@ public class DataSourceController extends BaseController {
|
||||||
public Result<List<DatabaseTableInformation>> table (@RequestParam("databaseName") String databaseName){
|
public Result<List<DatabaseTableInformation>> table (@RequestParam("databaseName") String databaseName){
|
||||||
return dataSourceService.table(databaseName);
|
return dataSourceService.table(databaseName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//统计数量
|
||||||
|
@GetMapping("/quantity")
|
||||||
|
public Result<List<DatabaseTableInformation>> quantity(){
|
||||||
|
return dataSourceService.quantity();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,4 +43,8 @@ public interface DataSourceMapper extends BaseMapper<DataSource> {
|
||||||
List<DatabaseTableModel> database(@Param("name") String name);
|
List<DatabaseTableModel> database(@Param("name") String name);
|
||||||
|
|
||||||
List<DatabaseTableInformation> table(@Param("databaseName") String databaseName);
|
List<DatabaseTableInformation> table(@Param("databaseName") String databaseName);
|
||||||
|
|
||||||
|
List<DatabaseTableInformation> quantity();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,4 +41,8 @@ public interface DataSourceService extends IService<DataSource> {
|
||||||
Result<List<DatabaseTableModel>> database(String name);
|
Result<List<DatabaseTableModel>> database(String name);
|
||||||
|
|
||||||
Result<List<DatabaseTableInformation>> table(String databaseName);
|
Result<List<DatabaseTableInformation>> table(String databaseName);
|
||||||
|
|
||||||
|
Result<List<DatabaseTableInformation>> quantity();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -277,4 +277,10 @@ public class DataSourceServiceImpl extends ServiceImpl<DataSourceMapper, DataSou
|
||||||
List<DatabaseTableInformation> information = dataSourceMapper.table(databaseName);
|
List<DatabaseTableInformation> information = dataSourceMapper.table(databaseName);
|
||||||
return Result.success(information);
|
return Result.success(information);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<List<DatabaseTableInformation>> quantity() {
|
||||||
|
return Result.success(dataSourceMapper.quantity());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,6 +187,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="table" resultType="com.muyu.data.source.domain.DatabaseTableInformation">
|
<select id="table" resultType="com.muyu.data.source.domain.DatabaseTableInformation">
|
||||||
select * from database_table_information where database_name=#{databaseName}
|
select * from database_table_information where database_name=#{databaseName}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="quantity" resultType="com.muyu.data.source.domain.DatabaseTableInformation">
|
||||||
|
select * from database_table_information
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue