| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.stylefeng.guns.modular.system.util.httpClinet.HttpClientUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | map.put("key", key); |
| | | map.put("idcard", idcard); |
| | | map.put("realname", name); |
| | | String content = httpClientUtil.pushHttpRequset("GET", "http://op.juhe.cn/idcard/query", map, new HashMap<>(), "form"); |
| | | String content = null; |
| | | try { |
| | | content = httpClientUtil.pushHttpRequset("GET", "http://op.juhe.cn/idcard/query", map, new HashMap<>(), "form").getData(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.err.println(content); |
| | | JSONObject jsonObject = JSON.parseObject(content); |
| | | if(jsonObject.getIntValue("error_code") == 0){ |