|
|
|
@ -6,8 +6,7 @@ import com.msdw.tms.entity.request.QuestionsQueryRequest; |
|
|
|
|
import com.msdw.tms.entity.request.QuestionsUpdateRequest; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
|
@ -29,45 +28,45 @@ public interface QuestionsControllerApi { |
|
|
|
|
* 列表 |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value = "分页加条件查询试题信息", notes = "分页加条件查询试题信息") |
|
|
|
|
R list(@RequestParam Integer page, |
|
|
|
|
@RequestParam Integer size, |
|
|
|
|
R list(@ApiParam(name = "page", value = "页码", required = true) Integer page, |
|
|
|
|
@ApiParam(name = "size", value = "每页显示的数据条数", required = true) Integer size, |
|
|
|
|
QuestionsQueryRequest request); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 信息 |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value = "根据试题id查询试题详情信息", notes = "根据试题id查询试题详情信息") |
|
|
|
|
R info(@PathVariable("id") Integer id); |
|
|
|
|
R info(@ApiParam(name = "id", value = "试题主键", required = true) Integer id); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 保存 |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value = "新增一道试题", notes = "传入新增试题所需相关参数") |
|
|
|
|
R save(@RequestBody QuestionsAddRequest questions); |
|
|
|
|
R save(QuestionsAddRequest questions); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 根据试题id修改试题信息 |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value = "根据试题id修改试题信息", notes = "根据试题id修改试题信息") |
|
|
|
|
R update(@RequestBody QuestionsUpdateRequest questions); |
|
|
|
|
R update(QuestionsUpdateRequest questions); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 是否禁用试题 |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value = "是否禁用试题", notes = "是否禁用试题") |
|
|
|
|
R isnable(Integer id); |
|
|
|
|
R isnable(@ApiParam(name = "id", value = "试题主键", required = true) Integer id); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 删除 |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value = "批量删除试题信息", notes = "批量删除试题信息") |
|
|
|
|
R delete(@RequestBody Integer[] ids); |
|
|
|
|
R delete(@ApiParam(name = "ids", value = "试题主键列表", required = true) Integer[] ids); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过excel批量导入 |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value = "通过excel批量导入", notes = "通过excel批量导入") |
|
|
|
|
R importQuestion(@RequestParam(name = "file") MultipartFile file) throws IOException; |
|
|
|
|
R importQuestion(@ApiParam(name = "file", value = "excel文件", required = true) MultipartFile file) throws IOException; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* excel模板文件上传 |
|
|
|
@ -76,7 +75,7 @@ public interface QuestionsControllerApi { |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value = "excel模板文件上传", notes = "excel模板文件上传") |
|
|
|
|
R uploadFiles(MultipartFile file) throws IOException; |
|
|
|
|
R uploadFiles(@ApiParam(name = "file", value = "excel文件", required = true) MultipartFile file) throws IOException; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* excel模板文件下载 |
|
|
|
|