|
@@ -1,12 +1,14 @@
|
|
|
package com.ruixuan.salesLeads.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ruixuan.common.core.domain.ResultResponse;
|
|
|
import com.ruixuan.common.utils.PageUtils;
|
|
|
import com.ruixuan.common.utils.StringUtils;
|
|
|
import com.ruixuan.salesLeads.mapper.SaleClueCallRecordMapper;
|
|
|
import com.ruixuan.salesLeads.mapper.SaleClueCallResultMapper;
|
|
|
+import com.ruixuan.salesLeads.mapper.SaleClueInfoMapper;
|
|
|
import com.ruixuan.salesLeads.mapper.TestMapper;
|
|
|
import com.ruixuan.salesLeads.pojo.SaleClueCallResultPojo;
|
|
|
import com.ruixuan.salesLeads.pojo.TestPojo;
|
|
@@ -15,6 +17,7 @@ import com.ruixuan.salesLeads.service.ITestService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@@ -37,6 +40,8 @@ public class SaleClueCallRecordServiceImpl implements ISaleClueCallRecordService
|
|
|
@Autowired
|
|
|
private SaleClueCallResultMapper saleClueCallResultMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SaleClueInfoMapper saleClueInfoMapper;
|
|
|
|
|
|
/**
|
|
|
*
|
|
@@ -57,6 +62,23 @@ public class SaleClueCallRecordServiceImpl implements ISaleClueCallRecordService
|
|
|
log.info("callBackUrl-----type----{}----->>>{}","importPhone",json);
|
|
|
//保存 导入号码的 回调信息
|
|
|
saleClueCallRecordMapper.addSaleCallRecord(json.toJSONString());
|
|
|
+
|
|
|
+ JSONArray array = json.getJSONArray("error");
|
|
|
+ if (!array.isEmpty()){
|
|
|
+ log.info("销售线索导入失败------》》》》{}",array);
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONArray success = json.getJSONArray("success");
|
|
|
+ if (!success.isEmpty()){
|
|
|
+ for (Object obj : success) {
|
|
|
+ JSONObject jsonObject = (JSONObject) JSONObject.toJSON(obj);
|
|
|
+ //修改线索的导入记录状态
|
|
|
+ saleClueInfoMapper.updateSaleClueImportPhoneFlag(Long.valueOf(jsonObject.getString("id")),1);
|
|
|
+ log.info("销售线索导入成功,修改线索导入状态------线索id》》》》{}",jsonObject.getString("id"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
return ResultResponse.successMsg("callBackUrl--->>>导入号码回调信息成功",json);
|
|
|
}
|
|
|
log.info("callBackUrl-----type----{}----->>>{}","phoneResult",json);
|