网址改为配置

This commit is contained in:
季圣华
2021-06-19 21:31:37 +08:00
parent dd90168359
commit b3510488ca
4 changed files with 30 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ public class PlatformConfigController {
* @param request
* @return
*/
@GetMapping(value = "/getPlatformName")
@GetMapping(value = "/getPlatform/name")
public String getPlatformName(HttpServletRequest request)throws Exception {
String res;
try {
@@ -46,6 +46,25 @@ public class PlatformConfigController {
return res;
}
/**
* 获取官方网站地址
* @param request
* @return
*/
@GetMapping(value = "/getPlatform/url")
public String getPlatformUrl(HttpServletRequest request)throws Exception {
String res;
try {
String platformKey = "platform_url";
PlatformConfig platformConfig = platformConfigService.getPlatformConfigByKey(platformKey);
res = platformConfig.getPlatformValue();
} catch(Exception e){
e.printStackTrace();
res = "#";
}
return res;
}
/**
* 根据platformKey更新platformValue
* @param object