
package com.crunii.micro.service.sysmgr.controller;

import com.crunii.micro.common.dto.Result;
import com.crunii.micro.service.sysmgr.dto.sysmgr.PdfDto;
import com.crunii.micro.service.sysmgr.service.IRSSignaturesService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;


@RestController
@RequestMapping("/irs/IRSSignaturesController")
@Slf4j
public class IRSSignaturesController {

    @Autowired
    private IRSSignaturesService service;

    @GetMapping("/getAllYkzOrganizations")
    @ResponseBody
    public Result<String> getIRSToken(String loginId) {
        return service.getIRSToken(loginId);
    }
    @PostMapping("/uploadPicture")
    @ResponseBody
    public Result<String> uploadPicture(@RequestPart("file") MultipartFile file,String token) {
        return service.uploadPicture(file,token);
    }
    @ApiOperation("pdf转png")
    @PostMapping("/pdfToPng")
    public Result<String> pdfToPng(@RequestBody PdfDto dto){
        return service.pdfToPng(dto);
    }
}
