package com.mortals.xhx.busiz.handler.impl;

import com.alibaba.fastjson.JSON;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.xhx.busiz.handler.BaseReqHandler;
import com.mortals.xhx.busiz.rsp.ApiResp;
import com.mortals.xhx.busiz.rsp.IdCardResp;
import com.mortals.xhx.busiz.rsp.PrintListResp;
import com.mortals.xhx.module.idCard.model.IdCardCons;
import com.mortals.xhx.module.idCard.service.IdCardService;
import com.mortals.xhx.module.print.model.Printer;
import com.mortals.xhx.module.print.service.PrintService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 身份证识别
 *
 * @author:
 * @date: 2023/1/5 22:25
 */
@Service
@Slf4j
public class BusizIdcardRecognitionReqHandler extends BaseReqHandler<String, Void> {

    @Autowired
    private IdCardService idCardService;

    @Override
    protected ApiResp<Void> handle(String printReq) throws AppException {
        IdCardCons idCardCons = new IdCardCons();
        IdCardResp idCardResp = idCardService.readIdCardMessage(idCardCons);
        log.info("【身份识别】【执行响应】-->{}", JSON.toJSONString(idCardResp));
        return idCardResp;

    }

    @Override
    protected void validData(String request) throws IllegalArgumentException {

    }


}
