|
@@ -0,0 +1,37 @@
|
|
|
+package com.keao.edu.controller;
|
|
|
+
|
|
|
+
|
|
|
+import com.keao.edu.common.controller.BaseController;
|
|
|
+import com.keao.edu.common.tenant.TenantContextHolder;
|
|
|
+import com.keao.edu.user.service.SysConfigService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 系统配置控制层
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@Api(tags = "系统参数设置")
|
|
|
+@RequestMapping(value = "sysConfig")
|
|
|
+public class SysConfigController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SysConfigService sysConfigService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "查询参数")
|
|
|
+ @GetMapping(value = "queryByParamName")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('sysConfig/queryByParamName')")
|
|
|
+ public Object queryByParamName(String paramName) {
|
|
|
+ if(StringUtils.isBlank(paramName)){
|
|
|
+ return failed("参数不能为空");
|
|
|
+ }
|
|
|
+ String tenantId = TenantContextHolder.getTenantId();
|
|
|
+ return succeed(sysConfigService.findByParamName(paramName,tenantId));
|
|
|
+ }
|
|
|
+}
|