44323
2024-05-29 fe3b034bfcb263336667bac9d4a002360533951b
ruoyi-service/ruoyi-study/src/main/java/com/ruoyi/study/controller/TStoryController.java
@@ -51,7 +51,7 @@
    @Autowired
    private ITStoryService service;
    @PostMapping("/storyList")
    @ApiOperation(value = "列表查询", tags = {"故事管理"})
//    @ApiOperation(value = "列表查询", tags = {"故事管理"})
    public R<PageInfo<SubjectVO>> storyList(@RequestBody SubjectQuery query) {
        PageInfo<SubjectVO> res = new PageInfo<>(query.getPageNumber(), query.getPageSize());
        List<SubjectVO> list =  service.listAll(query);
@@ -76,7 +76,7 @@
        return R.ok(res);
    }
    @PostMapping("/add")
    @ApiOperation(value = "添加", tags = {"故事管理"})
//    @ApiOperation(value = "添加", tags = {"故事管理"})
    public R add(@RequestBody StoryDTO dto) {
        TStory tSubject = new TStory();
        BeanUtils.copyProperties(dto,tSubject);
@@ -84,7 +84,7 @@
        return R.ok("添加成功");
    }
    @PostMapping("/update")
    @ApiOperation(value = "编辑", tags = {"故事管理"})
//    @ApiOperation(value = "编辑", tags = {"故事管理"})
    public R update(@RequestBody StoryDTO dto) {
        TStory tSubject = new TStory();
        R<Object> week = getObjectR(dto.getId());
@@ -94,7 +94,7 @@
        return R.ok("编辑成功");
    }
    @PostMapping("/getInfo")
    @ApiOperation(value = "查看详情", tags = {"故事管理"})
//    @ApiOperation(value = "查看详情", tags = {"故事管理"})
    public R<StoryDTO> getInfo1(@RequestParam("id") Integer id) {
        TStory byId = service.getById(id);
        StoryDTO subjectDTO = new StoryDTO();
@@ -102,7 +102,7 @@
        return R.ok(subjectDTO);
    }
    @PostMapping("/updateState/{id}/{state}")
    @ApiOperation(value = "修改状态", tags = {"故事管理"})
//    @ApiOperation(value = "修改状态", tags = {"故事管理"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "题目id", required = true),
            @ApiImplicitParam(name = "state", value = "1上架2下架3删除", required = true),