update the ability for administrators to view all data sources by type
@ -328,7 +328,7 @@ public class DataSourceService extends BaseService{
List<DataSource> datasourceList;
if (isAdmin(loginUser)) {
datasourceList = dataSourceMapper.listAllDataSourceByType();
datasourceList = dataSourceMapper.listAllDataSourceByType(type);
}else{
datasourceList = dataSourceMapper.queryDataSourceByType(loginUser.getId(), type);
}
@ -227,6 +227,6 @@ public interface DataSourceMapper {
@Result(property = "updateTime", column = "update_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE)
})
@SelectProvider(type = DataSourceMapperProvider.class, method = "listAllDataSourceByType")
List<DataSource> listAllDataSourceByType();
List<DataSource> listAllDataSourceByType(@Param("type") Integer type);
@ -239,6 +239,7 @@ public class DataSourceMapperProvider {
return new SQL() {{
SELECT("*");
FROM(TABLE_NAME);
WHERE("type = #{type}");
}}.toString();