|
@@ -2,6 +2,7 @@ package cn.com.qmth.examcloud.core.basic.api.controller;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.io.FileInputStream;
|
|
|
+import java.io.FileNotFoundException;
|
|
|
import java.io.IOException;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
@@ -247,22 +248,16 @@ public class OrgController extends ControllerSupport{
|
|
|
return new ResponseEntity(org, HttpStatus.OK);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "按code查询机构(学习中心)", notes = "code查询")
|
|
|
- @GetMapping("/logo")
|
|
|
- public void logo(@RequestParam("domain") String domain, HttpServletResponse response) {
|
|
|
- Org org = orgRepo.findFirstByParentIdAndCode(0L, domain);
|
|
|
-
|
|
|
- String logo = org.getLogo();
|
|
|
- try {
|
|
|
- IOUtils.copy(new FileInputStream(logo), response.getOutputStream());
|
|
|
- response.flushBuffer();
|
|
|
- } catch (IOException e) {
|
|
|
- LOG.error("下载LOGO失败,", e);
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ @ApiOperation(value = "按code查询机构(学习中心)", notes = "code查询")
|
|
|
+ @GetMapping("/logo")
|
|
|
+ public void logo(@RequestParam("domain") String domain, HttpServletResponse response)
|
|
|
+ throws IOException {
|
|
|
+ Org org = orgRepo.findFirstByParentIdAndCode(0L, domain);
|
|
|
+ String logo = org.getLogo();
|
|
|
+ IOUtils.copy(new FileInputStream(logo), response.getOutputStream());
|
|
|
+ response.flushBuffer();
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
@ApiOperation(value = "查询机构不分页带查询", notes = "不分页带查询")
|
|
|
@GetMapping("/all")
|
|
|
public ResponseEntity getAllExam(@ModelAttribute Org orgCriteria,
|