puzhibing
2023-02-25 4ba348b700fd7f461f754a283eaeeba3fc9ff36c
driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/util/ChinaMobileUtil.java
@@ -2,6 +2,8 @@
import com.alibaba.fastjson.JSONObject;
import com.supersavedriving.driver.core.util.MD5Util;
import com.supersavedriving.driver.modular.system.util.httpClinet.HttpClientUtil;
import com.supersavedriving.driver.modular.system.util.httpClinet.HttpResult;
import org.apache.commons.codec.binary.Base64;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -18,9 +20,6 @@
    private String APIKey = "zj42494b1bdd416b9762229af6b5cbbd";
    private String SecretKey = "30323561316534653735613230316339";
    @Autowired
    private HttpClientUtil httpClientUtil;
    /**
@@ -52,7 +51,8 @@
        Map<String, String> header = new HashMap<String, String>(3);
        header.put("Authorization", "Basic " + new String(Base64.encodeBase64((APIKey + ":" + SecretKey).getBytes())));
        header.put("Content-Type", "application/json;charset=utf-8");
        String post = httpClientUtil.pushHttpRequset("POST", "https://ct.open.10086.cn/ordernumber/v1/binding", request, header, "json");
        HttpResult httpResult = HttpClientUtil.pushHttpRequset("POST", "https://ct.open.10086.cn/ordernumber/v1/binding", request, header, "json");
        String post = httpResult.getData();
        Map<String, String> map1 = new HashMap<>();
        if(post.indexOf("0000") != -1){
            JSONObject jsonObject = JSONObject.parseObject(post);
@@ -90,7 +90,8 @@
        Map<String, String> header = new HashMap<String, String>(3);
        header.put("Authorization", "Basic " + new String(Base64.encodeBase64((APIKey + ":" + SecretKey).getBytes())));
        header.put("Content-Type", "application/json;charset=utf-8");
        String post = httpClientUtil.pushHttpRequset("POST", "https://ct.open.10086.cn/ordernumber/v1/unbinding", request, header, "json");
        HttpResult httpResult = HttpClientUtil.pushHttpRequset("POST", "https://ct.open.10086.cn/ordernumber/v1/unbinding", request, header, "json");
        String post = httpResult.getData();
        JSONObject jsonObject = JSONObject.parseObject(post);
        Map<String, String> map1 = new HashMap<>();
        if(jsonObject.getString("code").equals("0000")){