MatchCollegePdfController.java 1.96 KB
package com.zhongzhi.controller;


import com.zhongzhi.common.constant.Platform;
import com.zhongzhi.common.utils.LoginRequired;
import com.zhongzhi.common.utils.ResponseData;
import com.zhongzhi.dto.project.ProjectListPageDTO;
import com.zhongzhi.model.MatchCollegePdfDO;
import com.zhongzhi.service.MatchCollegePdfService;
import com.zhongzhi.vo.ResponseVO;
import io.swagger.annotations.Api;
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;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author DengMin
 * @since 2024-06-25
 */
@RestController
@RequestMapping("/matchCollegePdf")
@Api(tags = "pdf")
public class MatchCollegePdfController {

    @Autowired
    private MatchCollegePdfService matchCollegePdfService;

    @PostMapping("uploadPdf")
    @ApiOperation("上传盖章pdf  attachment matchId fileName")
    @LoginRequired(Platform.school)
    public ResponseVO uploadPdf(@RequestBody MatchCollegePdfDO matchCollegePdfDO) {
        matchCollegePdfService.uploadPdf(matchCollegePdfDO);
        return ResponseData.generateCreatedResponse(0);
    }

    @PostMapping("dropPdf")
    @ApiOperation("删除盖章pdf  matchId")
    @LoginRequired(Platform.school)
    public ResponseVO dropPdf(@RequestBody MatchCollegePdfDO matchCollegePdfDO) {
        matchCollegePdfService.dropPdf (matchCollegePdfDO);
        return ResponseData.generateCreatedResponse(0);
    }

    @PostMapping("queryPdfStatus")
    @ApiOperation("查看pdf  matchId")
    @LoginRequired(Platform.school)
    public ResponseVO queryPdfStatus(@RequestBody MatchCollegePdfDO matchCollegePdfDO) {
        return ResponseData.generateCreatedResponse(0, matchCollegePdfService.queryPdfStatus (matchCollegePdfDO));
    }




}