zouxuan пре 4 година
родитељ
комит
45c0d422a2

+ 0 - 6
edu-user/edu-teacher-server/src/main/java/com/keao/edu/controller/StudentExamResultController.java

@@ -1,9 +1,7 @@
 package com.keao.edu.controller;
 
-import com.keao.edu.auth.api.client.SysUserFeignService;
 import com.keao.edu.common.controller.BaseController;
 import com.keao.edu.common.entity.HttpResponseResult;
-import com.keao.edu.user.service.EmployeeService;
 import com.keao.edu.user.service.StudentExamResultService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -24,10 +22,6 @@ public class StudentExamResultController extends BaseController {
 
     @Autowired
     private StudentExamResultService studentExamResultService;
-    @Autowired
-    private SysUserFeignService sysUserFeignService;
-    @Autowired
-    private EmployeeService employeeService;
 
     @ApiOperation("确认考生")
     @PostMapping(value = "/confirmStudent")

+ 37 - 0
edu-user/edu-teacher-server/src/main/java/com/keao/edu/controller/SysConfigController.java

@@ -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));
+	}
+}