|
@@ -1,18 +1,14 @@
|
|
|
package com.songhua.web.controller.system;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
+import com.alibaba.fastjson2.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import com.songhua.common.annotation.Log;
|
|
|
import com.songhua.common.core.controller.BaseController;
|
|
|
import com.songhua.common.core.domain.AjaxResult;
|
|
@@ -130,4 +126,17 @@ public class SysConfigController extends BaseController
|
|
|
configService.resetConfigCache();
|
|
|
return success();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 远程根据参数键名查询参数值
|
|
|
+ */
|
|
|
+ @PostMapping(value = "/remote/configKey")
|
|
|
+ public AjaxResult getConfigMap(@RequestBody JSONObject json){
|
|
|
+ List<String> keysList = new ArrayList<>();
|
|
|
+ for(Object key : json.getJSONArray("keys")){
|
|
|
+ keysList.add(key.toString());
|
|
|
+ }
|
|
|
+ return success(configService.getConfigMap(keysList));
|
|
|
+ }
|
|
|
}
|