CertCompanyMappingController.java 1.98 KB
package com.subsidy.controller;


import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.cert.ChangeCompanyCertsDTO;
import com.subsidy.dto.cert.GetCompanyCertsDTO;
import com.subsidy.dto.cert.GetCompanyCertsWithStatusDTO;
import com.subsidy.service.CertCompanyMappingService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import io.swagger.annotations.Api;
import sun.security.provider.certpath.ResponderId;

/**
 * <p>
 * 证书-公司映射表 前端控制器
 * </p>
 *
 * @author DengMin
 * @since 2022-05-11
 */
@RestController
@Api(tags = "证书-公司映射表")
@RequestMapping("/certCompanyMapping")
public class CertCompanyMappingController {

    @Autowired
    private CertCompanyMappingService certCompanyMappingService;

    @PostMapping("getCompanyCertsWithStatus")
    @ApiOperation("获取某个公司的项目证书(返回学生报名状态) companyId 公司id  typeId 类型id(查全部传空)  memberId 学生id")
    public ResponseVO getCompanyCertsWithStatus(@RequestParam GetCompanyCertsWithStatusDTO getCompanyCertsDTO){
        return ResponseData.generateCreatedResponse(0,certCompanyMappingService.getCompanyCertsWithStatus(getCompanyCertsDTO));
    }

    @PostMapping("getCompanyCerts")
    @ApiOperation("获取某个公司的证书情况 companyId pageSize  pageNum")
    public ResponseVO getCompanyCerts(@RequestBody GetCompanyCertsDTO getCompanyCertsDTO){
        return ResponseData.generateCreatedResponse(0,certCompanyMappingService.getCompanyCerts(getCompanyCertsDTO));
    }

    @PostMapping("changeCompanyCerts")
    @ApiOperation("开启/关闭权限   companyId certId signStatus")
    public ResponseVO changeCompanyCerts(@RequestBody ChangeCompanyCertsDTO changeCompanyCertsDTO){
        return ResponseData.generateCreatedResponse(0,certCompanyMappingService.changeCompanyCerts(changeCompanyCertsDTO));
    }




}