package com.zd.forward.serivce;

import com.zd.common.core.domain.R;

import java.util.Map;

/**
 * 图片源POST:算法结果解析
 * @Author: zhoupan
 * @Date: 2021/11/14/12:54
 * @Description:
 */
public class ImageCheckResultValidImpl implements CheckResultValid{
    @Override
    public R apply(Map<String, Object> map) {

        try {
            Map<String, Object>  algorithm_data = (Map<String, Object>)map.get("algorithm_data");
            Boolean is_alert = (Boolean)algorithm_data.get("is_alert");


            //是不是先要判断人数？？？？？？target_count
            if(is_alert) return R.fail("检查不通过！");
            //判断是否是多个目标等 返回详细失败结果

            return R.ok();
        } catch (Exception e) {
            return R.fail("结果解析错误！");
        }
    }
}
