refactor(缺陷管理): 优化第三方插件用户校验接口方法

This commit is contained in:
song-cc-rock 2024-01-09 19:34:16 +08:00 committed by 刘瑞斌
parent 47e85281db
commit e72c5126f2
2 changed files with 10 additions and 0 deletions

View File

@ -17,6 +17,10 @@ public abstract class AbstractPlatform implements Platform {
this.request = request; this.request = request;
} }
public <T> T getIntegrationConfig(Class<T> clazz) {
return getIntegrationConfig(request.getIntegrationConfig(), clazz);
}
public <T> T getIntegrationConfig(String integrationConfig, Class<T> clazz) { public <T> T getIntegrationConfig(String integrationConfig, Class<T> clazz) {
if (StringUtils.isBlank(integrationConfig)) { if (StringUtils.isBlank(integrationConfig)) {
throw new MSPluginException("服务集成配置为空"); throw new MSPluginException("服务集成配置为空");

View File

@ -25,6 +25,12 @@ public interface Platform extends ExtensionPoint {
*/ */
void validateIntegrationConfig(); void validateIntegrationConfig();
/**
* 校验用户配置
* 个人中心-第三方平台点击时调用
*/
void validateUserConfig(String userConfig);
/** /**
* 校验项目配置 * 校验项目配置
* 项目设置成点击校验项目 key 时调用 * 项目设置成点击校验项目 key 时调用