AcademyCollegeDictController.java 2.07 KB
package com.subsidy.controller;


import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.model.AcademyCollegeDictDO;
import com.subsidy.service.AcademyCollegeDictService;
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("/academyCollegeDict")
public class AcademyCollegeDictController {

    @Autowired
    private AcademyCollegeDictService academyCollegeDictService;

    @PostMapping("allCollege")
    @ApiOperation("查看某院校所有学院 academyId  college")
    public ResponseVO allCollege(@RequestBody AcademyCollegeDictDO academyCollegeDictDO){
        return ResponseData.generateCreatedResponse(0,academyCollegeDictService.allCollege(academyCollegeDictDO));
    }

    @PostMapping("addCollege")
    @ApiOperation("添加院校 academyId college")
    public ResponseVO addCollege(@RequestBody AcademyCollegeDictDO academyCollegeDictDO){
        return ResponseData.generateCreatedResponse(0,academyCollegeDictService.addCollege(academyCollegeDictDO));
    }

    @PostMapping("updateCollege")
    @ApiOperation("添加学院  id college")
    public ResponseVO updateCollege(@RequestBody AcademyCollegeDictDO academyCollegeDictDO){
        return ResponseData.generateCreatedResponse(0,academyCollegeDictService.updateCollege(academyCollegeDictDO));
    }

    @PostMapping("deleteCollege")
    @ApiOperation("删除学院 id  学院id ")
    public ResponseVO deleteCollege(@RequestBody AcademyCollegeDictDO  academyCollegeDictDO){
        return ResponseData.generateCreatedResponse(0,academyCollegeDictService.deleteCollege(academyCollegeDictDO));
    }

}