AcademyMajorDictController.java 2.08 KB
package com.subsidy.controller;


import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.model.AcademyMajorDictDO;
import com.subsidy.service.AcademyMajorDictService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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 io.swagger.annotations.Api;

/**
 * <p>
 * 专业字典表 前端控制器
 * </p>
 *
 * @author Tuyp
 * @since 2024-04-16
 */
@RestController
@Api(tags = "专业字典表")
@RequestMapping("/academyMajorDict")
public class AcademyMajorDictController {


    @Autowired
    private AcademyMajorDictService academyMajorDictService;

    @PostMapping("majors")
    @ApiOperation("查看某个学院下的所有专业  collegeId major")
    public ResponseVO majors(@RequestBody AcademyMajorDictDO academyMajorDictDO){
        return ResponseData.generateCreatedResponse(0,academyMajorDictService.majors(academyMajorDictDO));
    }

    @PostMapping("addMajor")
    @ApiOperation("查看某个学院下的所有专业  collegeId major")
    public ResponseVO addMajor(@RequestBody AcademyMajorDictDO academyMajorDictDO){
        return ResponseData.generateCreatedResponse(0,academyMajorDictService.addMajor(academyMajorDictDO));
    }

    @PostMapping("updateMajor")
    @ApiOperation("查看某个学院下的所有专业  id collegeId major")
    public ResponseVO updateMajor(@RequestBody AcademyMajorDictDO academyMajorDictDO){
        return ResponseData.generateCreatedResponse(0,academyMajorDictService.updateMajor(academyMajorDictDO));
    }


    @PostMapping("deleteMajor")
    @ApiOperation("查看某个学院下的所有专业  id ")
    public ResponseVO deleteMajor(@RequestBody AcademyMajorDictDO academyMajorDictDO){
        return ResponseData.generateCreatedResponse(0,academyMajorDictService.deleteMajor(academyMajorDictDO));
    }


}