| | |
| | | import com.xcong.farmer.cms.common.response.Result; |
| | | import com.xcong.farmer.cms.modules.system.dto.*; |
| | | import com.xcong.farmer.cms.modules.system.service.IColumnService; |
| | | import com.xcong.farmer.cms.modules.system.service.IReleaseService; |
| | | import com.xcong.farmer.cms.modules.system.vo.AdminColumnVo; |
| | | import com.xcong.farmer.cms.modules.system.vo.AdminSeeColumnInfoVo; |
| | | import com.xcong.farmer.cms.modules.system.vo.WebColumnVo; |
| | |
| | | import io.swagger.annotations.ApiResponses; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Resource |
| | | private IColumnService iColumnService; |
| | | |
| | | @Autowired |
| | | private IReleaseService releaseService; |
| | | |
| | | @ApiOperation(value = "栏目分页列表", notes = "栏目分页列表") |
| | | @ApiResponses({@ApiResponse(code = 200, message = "ok", response = AdminColumnVo.class)}) |
| | |
| | | |
| | | @ApiOperation(value = "发布栏目", notes = "发布栏目") |
| | | @PostMapping(value = "/release") |
| | | public Result release(@RequestBody ReleaseColumnDto releaseColumnDto) { |
| | | public Result release(@RequestBody @Valid ReleaseColumnDto releaseColumnDto) { |
| | | releaseService.releaseColumn(releaseColumnDto.getId(), releaseColumnDto.getType()); |
| | | return Result.ok("发布成功"); |
| | | } |
| | | |