CollegeFileController.java 1.99 KB
package com.subsidy.controller;


import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.common.constant.Platform;
import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.dto.college.FileManagementDTO;
import com.subsidy.model.CollegeFileDO;
import com.subsidy.service.CollegeFileService;
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 2025-01-09
 */
@RestController
@Api(tags = "院校材料")
@RequestMapping("/collegeFile")
public class CollegeFileController {

    @Autowired
    private CollegeFileService collegeFileService;

    @PostMapping("submitFile")
    @ApiOperation("院校端--材料上传  matchId collegeId  summaryUrl  summaryName  pptUrl  pptName  wordReportUrl  wordReportName   supportFileUrl  supportFileName ")
    public ResponseVO submitFile(@RequestBody CollegeFileDO collegeFileDO)throws Exception{
        return ResponseData.generateCreatedResponse(0,collegeFileService.submitFile(collegeFileDO));
    }

    @PostMapping("recentFile")
    @ApiOperation("院校端--最近一次上传时间  matchId collegeId ")
    public ResponseVO recentFile(@RequestBody CollegeFileDO collegeFileDO){
        return ResponseData.generateCreatedResponse(0,collegeFileService.recentFile(collegeFileDO));
    }

    @PostMapping("fileManagement")
    @ApiOperation("中心端--材料管理 pageSize pageNum matchId projectGroup projectName")
    public ResponseVO fileManagement(@RequestBody FileManagementDTO fileManagementDTO){
        return ResponseData.generateCreatedResponse(0, collegeFileService.fileManagement(fileManagementDTO));
    }

}