jiangping
2024-07-12 3faf877e3ca03028d60bba265249a543e8f9b533
server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomCRMServiceImpl.java
@@ -15,7 +15,6 @@
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.util.*;
@@ -51,16 +50,16 @@
        String type = "postCusData";
        String appid = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_CRM_API_KEY);
        String urlStr =  (String)redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_CRM_API_URL) ;
        long _t = System.currentTimeMillis();
        String crmInfo="提交失败";
        if (StringUtils.isNotBlank(appid)||StringUtils.isNotBlank(urlStr)) {
            String token = DigestUtils.md5Hex(type + _t + appid);
            String url = urlStr + "?type=" + type + "&_t=" + _t + "&token=" + token;// 提交CRM地址
            String param = JSONObject.toJSONString(entity);
            int success =1;
            String result = null;
            int success =1;
            String url = urlStr;
            try {
                String token = DigestUtils.md5Hex(type + _t + appid);
                  url = urlStr + "?type=" + type + "&_t=" + _t + "&token=" + token;// 提交CRM地址
                  result = HttpsUtil.postJson(url,param);
                if (StringUtils.isNotBlank(result)) {
                    JSONObject r = JSONObject.parseObject(result.replace("(", "").replace(")", ""));
@@ -100,6 +99,9 @@
        return status;// 默认失败
    }
    public  void  saveInterfaceLog(String url,String name,String  param,Integer success,String respone){
            if(crmInterfaceLogMapper ==null){
                return;
            }
            CrmInterfaceLog log = new CrmInterfaceLog();
            log.setCreateDate(new Date());
            log.setUrl(url);