网址改为配置

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

@@ -667,6 +667,7 @@ CREATE TABLE `jsh_platform_config` (
-- ----------------------------
INSERT INTO `jsh_platform_config` VALUES ('1', 'platform_name', '平台名称', '华夏ERP');
INSERT INTO `jsh_platform_config` VALUES ('2', 'activation_code', '激活码', 'b687998cc991278832e0ebcb7a6e7d0f6870c29d21679e58fa91e388985b9df5c2cd553a8d2f91de');
INSERT INTO `jsh_platform_config` VALUES ('3', 'platform_url', '官方网站', 'http://www.huaxiaerp.com/');
-- ----------------------------
-- Table structure for jsh_role

View File

@@ -1076,4 +1076,11 @@ update jsh_material_category set delete_flag='0';
-- by jishenghua
-- 增加租户管理菜单
-- --------------------------------------------------------
INSERT INTO `jsh_erp`.`jsh_function` (`id`, `number`, `name`, `parent_number`, `url`, `component`, `state`, `sort`, `enabled`, `type`, `push_btn`, `icon`, `delete_flag`) VALUES ('18', '000109', '租户管理', '0001', '/system/tenant', '/system/TenantList', b'0', '0167', b'1', '电脑版', '1', 'profile', '0');
INSERT INTO `jsh_function` (`id`, `number`, `name`, `parent_number`, `url`, `component`, `state`, `sort`, `enabled`, `type`, `push_btn`, `icon`, `delete_flag`) VALUES ('18', '000109', '租户管理', '0001', '/system/tenant', '/system/TenantList', b'0', '0167', b'1', '电脑版', '1', 'profile', '0');
-- --------------------------------------------------------
-- 时间 2021年6月19日
-- by jishenghua
-- 更新jsh_platform_config数据
-- --------------------------------------------------------
INSERT INTO `jsh_platform_config` (`id`, `platform_key`, `platform_key_info`, `platform_value`) VALUES ('3', 'platform_url', '官方网站', 'http://www.huaxiaerp.com/');

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

View File

@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
initParams = {@WebInitParam(name = "ignoredUrl", value = ".ico"),
@WebInitParam(name = "filterPath",
value = "/jshERP-boot/user/login#/jshERP-boot/user/registerUser#/jshERP-boot/user/randomImage" +
"#/jshERP-boot/platformConfig/getPlatformName#/jshERP-boot/v2/api-docs#/jshERP-boot/webjars")})
"#/jshERP-boot/platformConfig/getPlatform#/jshERP-boot/v2/api-docs#/jshERP-boot/webjars")})
public class LogCostFilter implements Filter {
private static final String FILTER_PATH = "filterPath";