package com.inkasso.factoring.zhongjiaoxinglu.web;

import com.inkasso.factoring.common.entity.ResponseJson;
import com.inkasso.factoring.zhongjiaoxinglu.entity.BusinessLicenseOCR;
import com.inkasso.factoring.zhongjiaoxinglu.entity.ZjxlIdCardOcr;
import com.inkasso.factoring.zhongjiaoxinglu.service.ZhongJiaoXingLuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 中交兴路控制类
 *
 * @author fengxuan
 * @email xuan.feng@changan-inkasso.com
 * @date 2021/12/13 10:59
 */
@RestController
public class ZhongJiaoXingLuController {

    @Autowired
    private ZhongJiaoXingLuService zhongJiaoXingLuService;

    /**
     * 身份证OCR
     * @param front
     * @param back
     * @return
     */
    @RequestMapping(value = "/zjxl/do_idCardOCR")
    public ResponseJson<ZjxlIdCardOcr> do_idCardOCR(@RequestParam Long front, @RequestParam Long back){
        return new ResponseJson(zhongJiaoXingLuService.idCardOCR(front, back));
    }

    /**
     * 营业执照OCR
     * @param fileId
     * @return
     */
    @RequestMapping(value = "/zjxl/do_businessLicenseOCR")
    public ResponseJson<BusinessLicenseOCR> do_businessLicenseOCR(@RequestParam Long fileId){
        return new ResponseJson(zhongJiaoXingLuService.do_businessLicenseOCR(fileId));
    }
}
