Blame view

AcademyDictController.java 3.56 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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
package com.subsidy.controller;


import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.academy.AcademiesDTO;
import com.subsidy.dto.academy.AcademyAccountDTO;
import com.subsidy.dto.academy.AddAcademyAccountDTO;
import com.subsidy.dto.academy.AddAcademyDTO;
import com.subsidy.model.AcademyDictDO;
import com.subsidy.model.AdministerDO;
import com.subsidy.service.AcademyDictService;
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-02-23
 */
@RestController
@Api(tags = "院校字典表")
@RequestMapping("/academyDict")
public class AcademyDictController {

    @Autowired
    private AcademyDictService academyDictService;

    @PostMapping("/academies")
    @ApiOperation("院校管理  academyName  pageNum  pageSize")
    public ResponseVO academies(@RequestBody AcademiesDTO academiesDTO){
        return ResponseData.generateCreatedResponse(0,academyDictService.academies(academiesDTO));
    }

    @PostMapping("addAcademy")
    @ApiOperation("添加院校 accountName  academyName  shortName  location  academyType telephone userName")
    public ResponseVO addAcademy(@RequestBody AddAcademyDTO addAcademyDTO){
        return ResponseData.generateCreatedResponse(0,academyDictService.addAcademy(addAcademyDTO));
    }

    @PostMapping("deleteAcademy")
    @ApiOperation("删除院校 id ")
    public ResponseVO deleteAcademy(@RequestBody AcademyDictDO academyDictDO){
        return ResponseData.generateCreatedResponse(0,academyDictService.deleteAcademy(academyDictDO));
    }

    @PostMapping("updateAcademy")
    @ApiOperation("修改院校 id  academyName  shortName  location  academyType  accountName telephone userName password")
    public ResponseVO updateAcademy(@RequestBody AddAcademyDTO addAcademyDTO){
        return ResponseData.generateCreatedResponse(0,academyDictService.updateAcademy(addAcademyDTO));
    }

    @PostMapping("academyAccount")
    @ApiOperation("院校账户管理 pageSize pageNum academyName")
    public ResponseVO academyAccount(@RequestBody AcademyAccountDTO academyAccountDTO){
        return ResponseData.generateCreatedResponse(0,academyDictService.academyAccount(academyAccountDTO));
    }

    @PostMapping("addAcademyAccount")
    @ApiOperation("添加院校账户  academyIds[]  telephone  accountName  userName password  remark ")
    public ResponseVO addAcademyAccount(@RequestBody AddAcademyAccountDTO addAcademyAccountDTO){
        return ResponseData.generateCreatedResponse(0,academyDictService.addAcademyAccount(addAcademyAccountDTO));
    }

    @PostMapping("deleteAcademyAccount")
    @ApiOperation("删除院校账户  id ")
    public ResponseVO deleteAcademyAccount(@RequestBody AdministerDO administerDO){
        return ResponseData.generateCreatedResponse(0,academyDictService.deleteAcademyAccount(administerDO));
    }

    @PostMapping("updateAcademyAccount")
    @ApiOperation("编辑院校账户  id academyIds[]  telephone  accountName  userName password ")
    public ResponseVO updateAcademyAccount(@RequestBody AddAcademyAccountDTO addAcademyAccountDTO){
        return ResponseData.generateCreatedResponse(0,academyDictService.updateAcademyAccount(addAcademyAccountDTO));
    }


}