From 2ce20c4dd9df60435afe5e6820103a37cf7f684a Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 12 七月 2024 18:26:15 +0800
Subject: [PATCH] 提交
---
server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomCRMServiceImpl.java | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomCRMServiceImpl.java b/server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomCRMServiceImpl.java
index 80212ef..9a3d67c 100644
--- a/server/service/src/main/java/com/doumee/biz/zbom/impl/ZbomCRMServiceImpl.java
+++ b/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);
--
Gitblit v1.9.3