| | |
| | | import com.ruoyi.article.controller.management.dto.MgtArticleAuditDTO; |
| | | import com.ruoyi.article.controller.management.dto.MgtArticleDTO; |
| | | import com.ruoyi.article.controller.management.dto.MgtArticleQuery; |
| | | import com.ruoyi.article.controller.management.dto.MgtArticleUpdDTO; |
| | | import com.ruoyi.article.controller.management.vo.MgtArticleVO; |
| | | import com.ruoyi.article.service.IArticleService; |
| | | import com.ruoyi.common.core.domain.R; |
| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 上架/下架 |
| | | * |
| | | * @param dto 资讯上下架数据传输对象 |
| | | */ |
| | | @ApiOperation("上架/下架") |
| | | @PutMapping("/upd-status") |
| | | public R<?> updStatus(@Validated @RequestBody MgtArticleUpdDTO dto) { |
| | | articleService.updStatus(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 删除资讯 |
| | | * |
| | | * @param id 资讯id |
| | | */ |
| | | @ApiOperation("删除资讯") |
| | | @DeleteMapping("/{id}") |
| | | public R<?> removeById( |
| | | @ApiParam(name = "id", value = "资讯id", required = true) @PathVariable("id") Long id) { |
| | | articleService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | } |