package com.ningdatech.carapi.driver.controller;


import com.ningdatech.basic.model.PageVo;
import com.ningdatech.carapi.driver.manage.ArticleInfoManage;
import com.ningdatech.carapi.driver.model.po.ReqArticleInfoListPO;
import com.ningdatech.carapi.driver.model.vo.ResArticleInfoListVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author LiuXinXin
 * @since 2022-10-09
 */
@RequestMapping("/api/v1/article-info")
@RestController
@Api(tags = "文章管理")
@Validated
@RequiredArgsConstructor
public class ArticleInfoController {

    private final ArticleInfoManage articleInfoManage;

    @PostMapping("/list")
    @ApiOperation("文章列表查询")
    public PageVo<ResArticleInfoListVO> articleInfoList(@Valid @RequestBody ReqArticleInfoListPO reqArticleInfoListPo) {
        return articleInfoManage.articleInfoList(reqArticleInfoListPo);
    }
    

}
