forked from github/dataease
fix: 插件卸载逻辑
This commit is contained in:
parent
8922d86040
commit
e9f779ad85
@ -524,6 +524,9 @@ public class ChartViewService {
|
||||
fieldMap.put("extBubble",extBubble);
|
||||
PluginViewParam pluginViewParam = buildPluginParam(fieldMap, fieldCustomFilter, extFilterList, ds, table, view);
|
||||
String sql = pluginViewSql(pluginViewParam, view);
|
||||
if (StringUtils.isBlank(sql)) {
|
||||
return emptyChartViewDTO(view);
|
||||
}
|
||||
datasourceRequest.setQuery(sql);
|
||||
data = datasourceProvider.getData(datasourceRequest);
|
||||
|
||||
|
@ -255,14 +255,14 @@ public class PluginService {
|
||||
}
|
||||
|
||||
public boolean versionMatch(String pluginVersion) {
|
||||
List<Integer> versionLists = Arrays.stream(version.split(".")).map(CodingUtil::string2Integer).collect(Collectors.toList());
|
||||
List<Integer> requireVersionLists = Arrays.stream(pluginVersion.split(".")).map(CodingUtil::string2Integer).collect(Collectors.toList());
|
||||
List<Integer> versionLists = Arrays.stream(version.split("\\.")).map(CodingUtil::string2Integer).collect(Collectors.toList());
|
||||
List<Integer> requireVersionLists = Arrays.stream(pluginVersion.split("\\.")).map(CodingUtil::string2Integer).collect(Collectors.toList());
|
||||
int maxSize = Math.max(versionLists.size(), requireVersionLists.size());
|
||||
for (int i = 0; i < maxSize; i++) {
|
||||
Integer currentV = versionLists.size() == i ? 0 : versionLists.get(i);
|
||||
Integer requireV = requireVersionLists.size() == i ? 0 : requireVersionLists.get(i);
|
||||
if (requireV > currentV) return false;
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ export function pluginLists(page, size, data) {
|
||||
|
||||
export function uninstall(pluginId) {
|
||||
return request({
|
||||
url: pathMap.queryPath + pluginId,
|
||||
url: pathMap.uninstallPath + pluginId,
|
||||
method: 'post',
|
||||
loading: true
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user