|
@@ -1,49 +0,0 @@
|
|
|
-package cn.com.qmth.examcloud.core.basic.api.controller;
|
|
|
-
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.http.HttpStatus;
|
|
|
-import org.springframework.http.ResponseEntity;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-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 cn.com.qmth.examcloud.core.basic.service.impl.OrgConfigService;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-
|
|
|
-/**
|
|
|
- * 机构配置API
|
|
|
- *
|
|
|
- * @author wang wei
|
|
|
- * @date 2018年4月9日
|
|
|
- */
|
|
|
-@Transactional
|
|
|
-@RestController
|
|
|
-@RequestMapping("${$rmp.ctr.basic}/orgConfig")
|
|
|
-public class OrgConfigController {
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private OrgConfigService orgConfigService;
|
|
|
-
|
|
|
- @ApiOperation(value = "查询机构配置", notes = "查询")
|
|
|
- @GetMapping("/{id}/{key}")
|
|
|
- public ResponseEntity<?> getOrgConfig(@PathVariable Long id, @PathVariable String key) {
|
|
|
-
|
|
|
- String value = orgConfigService.getOrgConfig(id, key);
|
|
|
-
|
|
|
- return new ResponseEntity<>(value, HttpStatus.OK);
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation(value = "更新机构配置", notes = "更新")
|
|
|
- @PutMapping("/{id}/{key}")
|
|
|
- public ResponseEntity<?> setOrgConfig(@PathVariable Long id, @PathVariable String key, @RequestBody String value) {
|
|
|
-
|
|
|
- orgConfigService.setOrgConfig(id, key, value);
|
|
|
-
|
|
|
- return new ResponseEntity<>("", HttpStatus.OK);
|
|
|
- }
|
|
|
-
|
|
|
-}
|