Blame view

CollegeFileController.java 1.99 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
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));
    }

}