Blame view

AcademyCollegeDictController.java 2.07 KB
涂亚平 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
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));
    }

}