| | |
| | | @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") |
| | |
| | | @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") |
| | |
| | | @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("修改成功"); |
| | | } |
| | | } |
| | | |