|
@@ -0,0 +1,47 @@
|
|
|
|
+package cn.com.qmth.examcloud.service.core.api;
|
|
|
|
+
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+import org.slf4j.Logger;
|
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
+
|
|
|
|
+import cn.com.qmth.examcloud.service.core.entity.OrgFunction;
|
|
|
|
+import cn.com.qmth.examcloud.service.core.repo.OrgFunctionRepo;
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * 机构功能API
|
|
|
|
+ *
|
|
|
|
+ * @author wang wei
|
|
|
|
+ * @date 2018年4月9日
|
|
|
|
+ */
|
|
|
|
+@RestController
|
|
|
|
+@RequestMapping("${app.api.root}/orgFunction")
|
|
|
|
+public class OrgFunctionApi {
|
|
|
|
+
|
|
|
|
+ private final Logger LOG = LoggerFactory.getLogger(this.getClass());
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ OrgFunctionRepo orgFunctionRepo;
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "查询所有功能", notes = "查询")
|
|
|
|
+ @GetMapping("/getAllFunctions")
|
|
|
|
+ public ResponseEntity<?> getAllFunctions() {
|
|
|
|
+ List<OrgFunction> allFuncs = orgFunctionRepo.findAll();
|
|
|
|
+ return new ResponseEntity<>(allFuncs, HttpStatus.OK);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "查询机构功能", notes = "查询")
|
|
|
|
+ @GetMapping("/{id}")
|
|
|
|
+ public ResponseEntity<?> getOrgFunctions(@PathVariable Long id) {
|
|
|
|
+ LOG.debug("getOrgFunctions(). id=" + id);
|
|
|
|
+ return new ResponseEntity<>("", HttpStatus.OK);
|
|
|
|
+ }
|
|
|
|
+}
|