package com.ningdatech.pmapi.provincial.controller;

import com.ningdatech.pmapi.provincial.model.dto.ProvincialProjectDTO;
import com.ningdatech.pmapi.provincial.service.IJoinReviewProvincialBureauService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * @Classname TestController
 * @Description
 * @Date 2023/3/2 15:08
 * @Author PoffyZhang
 */
@RestController
@RequestMapping("/api/v1/test")
@Api(tags = "测试省局接口")
public class TestController {

    @Autowired
    private IJoinReviewProvincialBureauService joinReviewProvincialBureauService;

    @PostMapping("/push")
    @ApiOperation("测试推送")
    private String push(@Valid @RequestBody ProvincialProjectDTO project){
        return joinReviewProvincialBureauService.pushImportProject(project);
    }

    @GetMapping("/detail")
    @ApiOperation("测试推送")
    private String detail(@RequestParam String projectId){
        return joinReviewProvincialBureauService.processInfo(projectId);
    }
}
