修改接口

master
xiaoCJ 8 months ago
parent 7158afe22f
commit e7508946d5

@ -227,4 +227,17 @@ public class CaseController {
} }
} }
} }
@AnonymousAccess
@ApiOperation("批量绑定案例题")
@PostMapping("batchBindCase")
public ResultEntity<String> batchBindCase(@ApiParam("传全部参数")@RequestBody List<SysTopicAndCourse> sysTopicAndCourse) {
try {
topicAndCourseMapper.batchInsert(sysTopicAndCourse);
} catch (Exception e) {
e.printStackTrace();
return new ResultEntity<>(HttpStatus.INTERNAL_SERVER_ERROR,"绑定失败,请联系管理员");
}
return new ResultEntity<>(HttpStatus.OK,"绑定成功!");
}
} }

@ -164,7 +164,7 @@ public class TopicResourceController {
@ApiOperation("客观题导入模板下载") @ApiOperation("客观题导入模板下载")
@AnonymousAccess @AnonymousAccess
public void downloadResource(HttpServletResponse response) { public void downloadResource(HttpServletResponse response) {
fileUtil.download(response, "客观题导入模板.xlsx", null); fileUtil.download(response, "客观题导入模板.xlsx", "/module");
} }

@ -219,7 +219,7 @@ public class ResourceApi {
@GetMapping("/getResource") @GetMapping("/getResource")
@ApiOperation("预览/获取视频或课件") @ApiOperation("预览/获取视频或课件")
@AnonymousAccess @AnonymousAccess
public ResponseEntity<FileSystemResource> streamVideo(@ApiParam("资源ID") @RequestParam String id) { public ResponseEntity<FileSystemResource> getResource(@ApiParam("资源ID") @RequestParam String id) {
SysResource sysResource = sysResourceMapper.selectByPrimaryKey(id); SysResource sysResource = sysResourceMapper.selectByPrimaryKey(id);
String url = sysResource.getUrl(); String url = sysResource.getUrl();

@ -17,16 +17,19 @@ public class SysTopicAndCourse {
@ApiModelProperty("一级目录ID/课程ID") @ApiModelProperty("一级目录ID/课程ID")
private String oneId; private String oneId;
@ApiModelProperty("一级名称")
private String oneName; private String oneName;
@ApiModelProperty("二级目录ID/章ID") @ApiModelProperty("二级目录ID/章ID")
private String twoId; private String twoId;
@ApiModelProperty("二级名称")
private String twoName; private String twoName;
@ApiModelProperty("三级目录ID/节ID") @ApiModelProperty("三级目录ID/节ID")
private String threeId; private String threeId;
@ApiModelProperty("三级名称")
private String threeName; private String threeName;
@ApiModelProperty("题目类型 0客观题 1案例题 2模型题") @ApiModelProperty("题目类型 0客观题 1案例题 2模型题")

Loading…
Cancel
Save