fix(个人中心): 三方平台账号页面显示插件名称
--bug=1035530 --user=宋昌昌 【个人中心】查看个人中心-三方平台账号页面-样式显示错误 https://www.tapd.cn/55049933/s/1462296
This commit is contained in:
parent
f455ac0085
commit
79d1343249
|
@ -2,6 +2,7 @@ package io.metersphere.system.service;
|
||||||
|
|
||||||
import io.metersphere.plugin.platform.spi.AbstractPlatformPlugin;
|
import io.metersphere.plugin.platform.spi.AbstractPlatformPlugin;
|
||||||
import io.metersphere.plugin.platform.spi.Platform;
|
import io.metersphere.plugin.platform.spi.Platform;
|
||||||
|
import io.metersphere.plugin.sdk.spi.MsPlugin;
|
||||||
import io.metersphere.sdk.constants.HttpMethodConstants;
|
import io.metersphere.sdk.constants.HttpMethodConstants;
|
||||||
import io.metersphere.sdk.constants.OperationLogConstants;
|
import io.metersphere.sdk.constants.OperationLogConstants;
|
||||||
import io.metersphere.sdk.constants.PluginScenarioType;
|
import io.metersphere.sdk.constants.PluginScenarioType;
|
||||||
|
@ -15,6 +16,7 @@ import io.metersphere.system.log.dto.LogDTO;
|
||||||
import io.metersphere.system.log.service.OperationLogService;
|
import io.metersphere.system.log.service.OperationLogService;
|
||||||
import io.metersphere.system.mapper.UserExtendMapper;
|
import io.metersphere.system.mapper.UserExtendMapper;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import org.pf4j.PluginWrapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@ -44,6 +46,9 @@ public class UserPlatformAccountService {
|
||||||
Map<String, Object> accountInfoMap = new HashMap<>();
|
Map<String, Object> accountInfoMap = new HashMap<>();
|
||||||
plugins.forEach(plugin -> {
|
plugins.forEach(plugin -> {
|
||||||
Object accountInfo = getAccountInfo(plugin.getId());
|
Object accountInfo = getAccountInfo(plugin.getId());
|
||||||
|
PluginWrapper pluginWrapper = pluginLoadService.getPluginWrapper(plugin.getId());
|
||||||
|
MsPlugin msPlugin = (MsPlugin) pluginWrapper.getPlugin();
|
||||||
|
((Map) accountInfo).put("pluginName", msPlugin.getName());
|
||||||
accountInfoMap.put(plugin.getId(), accountInfo);
|
accountInfoMap.put(plugin.getId(), accountInfo);
|
||||||
});
|
});
|
||||||
return accountInfoMap;
|
return accountInfoMap;
|
||||||
|
|
Loading…
Reference in New Issue