fix:DataSource And UdfFunc list query use Enum code value not ordinal (#15714)

Co-authored-by: Rick Cheng <rickchengx@gmail.com>
This commit is contained in:
songwenyong 2024-04-09 11:57:52 +08:00 committed by GitHub
parent 39274094f8
commit 9599b5aa81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -162,7 +162,7 @@ public class DataSourceController extends BaseController {
@ApiException(QUERY_DATASOURCE_ERROR)
public Result<Object> queryDataSourceList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("type") DbType type) {
List<DataSource> datasourceList = dataSourceService.queryDataSourceList(loginUser, type.ordinal());
List<DataSource> datasourceList = dataSourceService.queryDataSourceList(loginUser, type.getCode());
return Result.success(datasourceList);
}

View File

@ -554,7 +554,7 @@ public class ResourcesController extends BaseController {
@ApiException(QUERY_DATASOURCE_BY_TYPE_ERROR)
public Result<Object> queryUdfFuncList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("type") UdfType type) {
return udfFuncService.queryUdfFuncList(loginUser, type.ordinal());
return udfFuncService.queryUdfFuncList(loginUser, type.getCode());
}
/**