|
@@ -1,21 +1,17 @@
|
|
|
package com.yiqi.web.controller.system;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import com.yiqi.common.constant.UrlConstants;
|
|
|
+import com.yiqi.common.core.domain.R;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-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.yiqi.common.annotation.Log;
|
|
|
import com.yiqi.common.core.controller.BaseController;
|
|
|
import com.yiqi.common.core.domain.AjaxResult;
|
|
@@ -77,6 +73,19 @@ public class SysConfigRecordController extends BaseController {
|
|
|
return success(sysConfigRecordService.selectSysConfigRecordById(id));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @ApiOperation("通过参数获取参数配置,多个参数用英文逗号隔开")
|
|
|
+ @GetMapping(value = "getConfigValueByKey")
|
|
|
+ public AjaxResult getConfigValueByKey(@RequestParam String configKeys) {
|
|
|
+ String[] keys = configKeys.split(";");
|
|
|
+ List<SysConfigRecord> sysConfigRecordList = sysConfigRecordService.getConfigRecordByKey(keys);
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ for (SysConfigRecord record : sysConfigRecordList) {
|
|
|
+ map.put(record.getMenuName(), record.getValue());
|
|
|
+ }
|
|
|
+ return success(map);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 新增配置
|
|
|
*/
|