Quellcode durchsuchen

新增: 获取系统参数接口

张田野 vor 1 Stunde
Ursprung
Commit
9289d72785

+ 0 - 1
src/main/java/com/jeesite/modules/mes/web/MesSkillController.java

@@ -11,7 +11,6 @@ import com.jeesite.autoconfigure.core.QuartzAutoConfiguration;
 import com.jeesite.common.codec.EncodeUtils;
 import com.jeesite.common.codec.EncodeUtils;
 import com.jeesite.common.collect.MapUtils;
 import com.jeesite.common.collect.MapUtils;
 import com.jeesite.common.lang.StringUtils;
 import com.jeesite.common.lang.StringUtils;
-import com.jeesite.common.shiro.realms.IiIIiiiiiIII;
 import com.jeesite.modules.mes.entity.MesLine;
 import com.jeesite.modules.mes.entity.MesLine;
 import com.jeesite.modules.mes.entity.MesLineProcess;
 import com.jeesite.modules.mes.entity.MesLineProcess;
 import com.jeesite.modules.mes.entity.MesUserSkill;
 import com.jeesite.modules.mes.entity.MesUserSkill;

+ 26 - 0
src/main/java/com/jeesite/modules/mes/web/MesSystemConfigParamsController.java

@@ -0,0 +1,26 @@
+package com.jeesite.modules.mes.web;
+
+import com.jeesite.common.config.Global;
+import com.jeesite.common.web.BaseController;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+@Controller
+@RequestMapping(value = "${adminPath}/mes/configParams")
+public class MesSystemConfigParamsController extends BaseController {
+
+    @PostMapping("/info")
+    @ResponseBody
+    public String getValueByKey(@RequestParam(value = "key", required = false) String key) {
+        if(key == null || key.isEmpty()){
+            return "illegalKey";
+        }
+
+        String value = Global.getConfig(key);
+
+        return value == null ? "" : value;
+    }
+}

+ 1 - 0
src/main/resources/config/application.yml

@@ -684,6 +684,7 @@ shiro:
     ${adminPath}/mes/mesProductNg/save = anon
     ${adminPath}/mes/mesProductNg/save = anon
     ${adminPath}/mes/mesProductNg/addData = anon
     ${adminPath}/mes/mesProductNg/addData = anon
     ${adminPath}/mes/mesProductNg/ngcheck = anon
     ${adminPath}/mes/mesProductNg/ngcheck = anon
+    ${adminPath}/mes/configParams/info = anon
     ${adminPath}/** = user
     ${adminPath}/** = user