优化平台配置的接口

This commit is contained in:
季圣华
2023-06-06 21:34:31 +08:00
parent 3e28e14b49
commit a7280ca6e3
2 changed files with 47 additions and 6 deletions

View File

@@ -154,7 +154,7 @@ public class PlatformConfigService {
return result;
}
public PlatformConfig getPlatformConfigByKey(String platformKey)throws Exception {
public PlatformConfig getInfoByKey(String platformKey)throws Exception {
PlatformConfig platformConfig = new PlatformConfig();
try{
if(platformKey.contains("aliOss") || platformKey.contains("weixin")) {
@@ -172,4 +172,25 @@ public class PlatformConfigService {
}
return platformConfig;
}
/**
* 根据key查询平台信息-内部专用方法
* @param platformKey
* @return
* @throws Exception
*/
public PlatformConfig getPlatformConfigByKey(String platformKey)throws Exception {
PlatformConfig platformConfig = new PlatformConfig();
try{
PlatformConfigExample example = new PlatformConfigExample();
example.createCriteria().andPlatformKeyEqualTo(platformKey);
List<PlatformConfig> list=platformConfigMapper.selectByExample(example);
if(list!=null && list.size()>0){
platformConfig = list.get(0);
}
}catch(Exception e){
JshException.readFail(logger, e);
}
return platformConfig;
}
}