package com.cusc.nirvana.user.rnr.fp.controller;

import com.cusc.nirvana.common.result.Response;
import com.cusc.nirvana.user.rnr.fp.common.cloud.CloudMethod;
import com.cusc.nirvana.user.rnr.fp.common.cloud.CloudService;
import com.cusc.nirvana.user.rnr.fp.dto.OcrNpReqDTO;
import com.cusc.nirvana.user.rnr.fp.dto.OcrNpRespDTO;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author yubo
 * @since 2022-06-15 18:32
 */
@RestController
@RequestMapping("/ocr")
public class OcrController {


    @Resource
    private CloudService cloudService;

    @RequestMapping("/doOcr")
    public Response<OcrNpRespDTO> getOrganIdByUserId(@Validated @RequestBody OcrNpReqDTO bean) {
        return cloudService.postForResponse(CloudMethod.OCR_NP, bean, OcrNpRespDTO.class);
    }
}
