diff --git a/src/main/java/com/sztzjy/resource_center/controller/CaseController.java b/src/main/java/com/sztzjy/resource_center/controller/CaseController.java index 437e070..0d96dcb 100644 --- a/src/main/java/com/sztzjy/resource_center/controller/CaseController.java +++ b/src/main/java/com/sztzjy/resource_center/controller/CaseController.java @@ -227,4 +227,17 @@ public class CaseController { } } } + + @AnonymousAccess + @ApiOperation("批量绑定案例题") + @PostMapping("batchBindCase") + public ResultEntity batchBindCase(@ApiParam("传全部参数")@RequestBody List sysTopicAndCourse) { + try { + topicAndCourseMapper.batchInsert(sysTopicAndCourse); + } catch (Exception e) { + e.printStackTrace(); + return new ResultEntity<>(HttpStatus.INTERNAL_SERVER_ERROR,"绑定失败,请联系管理员"); + } + return new ResultEntity<>(HttpStatus.OK,"绑定成功!"); + } } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/resource_center/controller/TopicResourceController.java b/src/main/java/com/sztzjy/resource_center/controller/TopicResourceController.java index 3337522..f04034b 100644 --- a/src/main/java/com/sztzjy/resource_center/controller/TopicResourceController.java +++ b/src/main/java/com/sztzjy/resource_center/controller/TopicResourceController.java @@ -164,7 +164,7 @@ public class TopicResourceController { @ApiOperation("客观题导入模板下载") @AnonymousAccess public void downloadResource(HttpServletResponse response) { - fileUtil.download(response, "客观题导入模板.xlsx", null); + fileUtil.download(response, "客观题导入模板.xlsx", "/module"); } diff --git a/src/main/java/com/sztzjy/resource_center/controller/api/ResourceApi.java b/src/main/java/com/sztzjy/resource_center/controller/api/ResourceApi.java index 496f118..5fb3a2b 100644 --- a/src/main/java/com/sztzjy/resource_center/controller/api/ResourceApi.java +++ b/src/main/java/com/sztzjy/resource_center/controller/api/ResourceApi.java @@ -219,7 +219,7 @@ public class ResourceApi { @GetMapping("/getResource") @ApiOperation("预览/获取视频或课件") @AnonymousAccess - public ResponseEntity streamVideo(@ApiParam("资源ID") @RequestParam String id) { + public ResponseEntity getResource(@ApiParam("资源ID") @RequestParam String id) { SysResource sysResource = sysResourceMapper.selectByPrimaryKey(id); String url = sysResource.getUrl(); diff --git a/src/main/java/com/sztzjy/resource_center/entity/SysTopicAndCourse.java b/src/main/java/com/sztzjy/resource_center/entity/SysTopicAndCourse.java index 36532e9..2f50ab4 100644 --- a/src/main/java/com/sztzjy/resource_center/entity/SysTopicAndCourse.java +++ b/src/main/java/com/sztzjy/resource_center/entity/SysTopicAndCourse.java @@ -17,16 +17,19 @@ public class SysTopicAndCourse { @ApiModelProperty("一级目录ID/课程ID") private String oneId; + @ApiModelProperty("一级名称") private String oneName; @ApiModelProperty("二级目录ID/章ID") private String twoId; + @ApiModelProperty("二级名称") private String twoName; @ApiModelProperty("三级目录ID/节ID") private String threeId; + @ApiModelProperty("三级名称") private String threeName; @ApiModelProperty("题目类型 0客观题 1案例题 2模型题")