Blame view

MatchCollegePdfController.java 1.96 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
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));
    }




}