package com.ym.mec.student.controller;

import com.ym.mec.biz.dal.entity.Subject;
import com.ym.mec.biz.dal.entity.SubjectGoodsMapper;
import com.ym.mec.biz.dal.page.SubjectQueryInfo;
import com.ym.mec.biz.service.SubjectService;
import com.ym.mec.common.controller.BaseController;
import com.ym.mec.common.exception.BizException;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RequestMapping("subject")
@Api(tags = "科目服务")
@RestController
public class SubjectController extends BaseController {

    @Autowired
    private SubjectService subjectService;

    @ApiOperation(value = "列出所有分部")
    @PostMapping("/list")
    public Object list(){
        return succeed(subjectService.list());
    }
}
