package com.ruoyi.post.controller;

import com.ruoyi.post.controller.req.PostTypeListReq;
import com.ruoyi.post.frequency.posttype.entity.PostType;
import com.ruoyi.post.frequency.posttype.service.PostTypeService;
import com.ruoyi.response.ResponseData;
import com.ruoyi.vo.RyController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 帖子分类
 * @author liwenlong
 *
 */
@CrossOrigin
@RestController
@RequestMapping("/api/postType")
@Api(tags = "帖子分类")
public class ApiPostTypeController extends RyController {

    @Autowired
    private PostTypeService postTypeService;


    @ApiOperation(value = "获取帖子分类列表")
    @PostMapping("/postTypeList")
    public ResponseData<List<PostType>> postTypeList(@RequestBody PostTypeListReq req) {
        return postTypeService.postTypeList(req);
    }



}
