package com.zhongzheng.controller.course;

import com.zhongzheng.common.annotation.Log;
import com.zhongzheng.common.core.controller.BaseController;
import com.zhongzheng.common.core.domain.AjaxResult;
import com.zhongzheng.common.core.page.TableDataInfo;
import com.zhongzheng.common.enums.BusinessType;
import com.zhongzheng.modules.course.bo.CourseProjectTypeAddBo;
import com.zhongzheng.modules.course.bo.CourseProjectTypeEditBo;
import com.zhongzheng.modules.course.bo.CourseProjectTypeQueryBo;
import com.zhongzheng.modules.course.service.ICourseProjectTypeService;
import com.zhongzheng.modules.course.vo.CourseProjectTypeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 项目类型Controller
 *
 * @author ruoyi
 * @date 2021-10-08
 */
@Api(value = "项目类型控制器", tags = {"项目类型管理"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/app/common/course/projectType")
public class CourseProjectTypeController extends BaseController {

    private final ICourseProjectTypeService iCourseProjectTypeService;

    /**
     * 查询项目类型列表
     */
    @ApiOperation("查询项目类型列表")
    @GetMapping("/list")
    public TableDataInfo<CourseProjectTypeVo> list(CourseProjectTypeQueryBo bo) {
        bo.setStatus(new ArrayList<Integer>(Arrays.asList(1)));
        startPage();
        List<CourseProjectTypeVo> list = iCourseProjectTypeService.queryList(bo);
        return getDataTable(list);
    }


}
