无关风月
2024-07-03 1ab3022a08c32087cbc131fd00e25affacbb5eff
ruoyi-service/ruoyi-management/src/main/java/com/ruoyi/management/controller/TStudyController.java
@@ -133,13 +133,13 @@
            @ApiImplicitParam(value = "id", name = "id", required = true),
            @ApiImplicitParam(value = "状态 1上架2下架3删除", name = "state", required = true),
    })
    public AjaxResult updateState(Integer id, Integer state) {
    public R updateState(Integer id, Integer state) {
        R update = studyClient.updateState(id,state);
        int code = update.getCode();
        if (code == 500){
            return AjaxResult.error(update.getMsg());
        if (code == 602){
            return R.failUpdate(update.getMsg());
        }
        return AjaxResult.success("修改成功");
        return R.ok("修改成功");
    }
    @ApiOperation(value = "添加", tags = {"后台-故事管理"})
    @PostMapping(value = "/addStory")
@@ -151,13 +151,14 @@
    @ApiOperation(value = "修改", tags = {"后台-故事管理"})
    @PostMapping(value = "/updateStory")
    @ResponseBody
    public AjaxResult updateStory(StoryDTO dto) {
    public R updateStory(StoryDTO dto) {
        R update = studyClient.update(dto);
        int code = update.getCode();
        if (code == 500){
            return AjaxResult.error(update.getMsg());
        if (code == 602){
            return R.failUpdate(update.getMsg());
        }
        return AjaxResult.success("添加成功");
        return R.ok("添加成功");
    }
    @ApiOperation(value = "查看详情", tags = {"后台-故事管理"})
    @PostMapping(value = "/getStoryInfo")
@@ -174,13 +175,13 @@
            @ApiImplicitParam(value = "id", name = "id", required = true),
            @ApiImplicitParam(value = "状态 1上架2下架3删除", name = "state", required = true),
    })
    public AjaxResult updateState1(Integer id, Integer state) {
    public R updateState1(Integer id, Integer state) {
        R update = studyClient.updateState1(id,state);
        int code = update.getCode();
        if (code == 500){
            return AjaxResult.error(update.getMsg());
        if (code == 602){
            return R.failUpdate(update.getMsg());
        }
        return AjaxResult.success("修改成功");
        return R.ok("修改成功");
    }
}