forked from github/dataease
fix(插件): 自动升级插件版本号
This commit is contained in:
parent
de1712a38b
commit
09de0bcc5c
@ -8,4 +8,6 @@ import java.util.List;
|
|||||||
public interface ExtSysPluginMapper {
|
public interface ExtSysPluginMapper {
|
||||||
|
|
||||||
List<MyPlugin> query(KeywordRequest request);
|
List<MyPlugin> query(KeywordRequest request);
|
||||||
|
|
||||||
|
int updateVersion(String version);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,9 @@
|
|||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateVersion" parameterType="java.lang.String">
|
||||||
|
update my_plugin set version = #{version} where store = 'default'
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ public class PluginRunner implements ApplicationRunner {
|
|||||||
@Override
|
@Override
|
||||||
public void run(ApplicationArguments args) {
|
public void run(ApplicationArguments args) {
|
||||||
// 执行加载插件逻辑
|
// 执行加载插件逻辑
|
||||||
|
pluginService.systemUpgrade();
|
||||||
KeywordRequest request = new KeywordRequest();
|
KeywordRequest request = new KeywordRequest();
|
||||||
List<MyPlugin> plugins = pluginService.query(request);
|
List<MyPlugin> plugins = pluginService.query(request);
|
||||||
if (CollectionUtils.isEmpty(plugins)) return;
|
if (CollectionUtils.isEmpty(plugins)) return;
|
||||||
|
@ -68,6 +68,10 @@ public class PluginService {
|
|||||||
return extSysPluginMapper.query(request);
|
return extSysPluginMapper.query(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void systemUpgrade() {
|
||||||
|
extSysPluginMapper.updateVersion(version);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从本地安装处插件
|
* 从本地安装处插件
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user