|
|
@@ -74,7 +74,28 @@ public class CasllBackDataProcessor implements CallBackService {
|
|
|
sendGetRequest(CommercialCallBackReadyEnum.Commercial_ONE.getCode(),
|
|
|
CommercialCallBackReadyEnum.Commercial_ONE.getBusid(),commercialCallBackReadyEnum.getUrl(),md5List);
|
|
|
break;
|
|
|
-
|
|
|
+ case Commercial_GZWA://广州维安信息咨询有限公司
|
|
|
+ List<String> md5ListGZWA = callBackMap.get(productBizId);
|
|
|
+ log.info("开始处理机构id:{},广州维安信息咨询有限公司 当日订单数:{},条数:{}", productBizId,md5ListGZWA,md5ListGZWA.size());
|
|
|
+ if (CollectionUtils.isEmpty(md5ListGZWA)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ String channelType="21160";
|
|
|
+ String accessKey="4A79FD90-DA94-4D4B-AECD-BC48CD418970";
|
|
|
+ sendGetRequestGZWA(commercialCallBackReadyEnum.getCode(),
|
|
|
+ commercialCallBackReadyEnum.getBusid(),commercialCallBackReadyEnum.getUrl(),channelType,accessKey,"弘盛信息咨询有限公司",md5ListGZWA);
|
|
|
+ break;
|
|
|
+ case Commercial_TSSX://唐山硕鑫科技有限公司
|
|
|
+ List<String> md5ListTSSX = callBackMap.get(productBizId);
|
|
|
+ log.info("开始处理机构id:{},唐山硕鑫科技有限公司 当日订单数:{},条数:{}", productBizId,md5ListTSSX,md5ListTSSX.size());
|
|
|
+ if (CollectionUtils.isEmpty(md5ListTSSX)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ String channelTypeTSSX="21540";
|
|
|
+ String accessKeyTSSX="5D3842E0-7A2E-4077-8985-16F9782A0950";
|
|
|
+ sendGetRequestGZWA(commercialCallBackReadyEnum.getCode(),
|
|
|
+ commercialCallBackReadyEnum.getBusid(),commercialCallBackReadyEnum.getUrl(),channelTypeTSSX,accessKeyTSSX,"弘盛信息咨询有限公司",md5ListTSSX);
|
|
|
+ break;
|
|
|
case Commercial_HS://弘盛信息咨询有限公司
|
|
|
List<String> md5ListHS = callBackMap.get(productBizId);
|
|
|
log.info("开始处理机构id:{},弘盛信息咨询有限公司 当日订单数:{},条数:{}", productBizId,md5ListHS,md5ListHS.size());
|
|
|
@@ -627,7 +648,64 @@ public class CasllBackDataProcessor implements CallBackService {
|
|
|
// handleMappedData(busiId,followupList);
|
|
|
//
|
|
|
// }
|
|
|
+ //融享客通用
|
|
|
+ private void sendGetRequestGZWA(String productBizId,String busiId,String url,String companyName,String channelType,String accessKey,List<String> md5ListGZWA){
|
|
|
+
|
|
|
+ JSONObject object = new JSONObject();
|
|
|
+ object.put("accessKey",accessKey);
|
|
|
+ object.put("channelType", channelType);
|
|
|
+ object.put("phoneMd5List", md5ListGZWA);
|
|
|
+ String jsonString = JSON.toJSONString(object);
|
|
|
+ String responseStr = HttpClientThreeUtil.post(url, jsonString);
|
|
|
+ JSONObject response = JSON.parseObject(responseStr);
|
|
|
+ String code = response.getString("code");
|
|
|
+ if (!"200".equals(code)) {
|
|
|
+ log.info("busiId:{},companyName {},24h返回数据错误: {},{}" ,busiId,companyName,
|
|
|
+ response.getString("msg"),response.getString("code"));
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONArray dataArray = response.getJSONArray("data");
|
|
|
+ List<CustomerFollowup> followupList = new ArrayList<>();
|
|
|
|
|
|
+ // 遍历 data 数组,创建实体对象并设置对应字段
|
|
|
+ for (int i = 0; i < dataArray.size(); i++) {
|
|
|
+ JSONObject obj = dataArray.getJSONObject(i);
|
|
|
+ CustomerFollowup followup = new CustomerFollowup();
|
|
|
+ followup.setBusiId(busiId);
|
|
|
+ followup.setProductBizId(Integer.parseInt(productBizId));
|
|
|
+ followup.setPhoneMd5(obj.getString("phoneMd5"));
|
|
|
+ String star = obj.getString("grade");
|
|
|
+ if (StringUtils.isEmpty(star)) {
|
|
|
+ log.info("busiId:{} companyName {}, mobile_md5{} 没有填星级:", busiId, companyName ,followup.getPhoneMd5());
|
|
|
+ continue;
|
|
|
+ } else {
|
|
|
+ if ("0".equals(star)) {
|
|
|
+ followup.setStarLevel(new BigDecimal(0));
|
|
|
+ } else if ("10".equals(star)) {
|
|
|
+ followup.setStarLevel(new BigDecimal(1));
|
|
|
+ }else if ("20".equals(star)) {
|
|
|
+ followup.setStarLevel(new BigDecimal(2));
|
|
|
+ }else if ("30".equals(star)) {
|
|
|
+ followup.setStarLevel(new BigDecimal(3));
|
|
|
+ }else if ("40".equals(star)) {
|
|
|
+ followup.setStarLevel(new BigDecimal(4));
|
|
|
+ }else if ("50".equals(star)) {
|
|
|
+ followup.setStarLevel(new BigDecimal(5));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ followup.setSourceType(3);
|
|
|
+ followup.setFollowTime(new Date());
|
|
|
+ followupList.add(followup);
|
|
|
+ }
|
|
|
+ if (CollectionUtils.isEmpty(followupList)) {
|
|
|
+ log.info("busiId:{} companyName:{},没有24h星级数据", busiId,companyName);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ log.info("busiId:{} companyName:{} 处理数据条:{}", busiId, companyName,followupList.size());
|
|
|
+ handleMappedData(busiId,followupList);
|
|
|
+
|
|
|
+ }
|
|
|
//https://api.zhudaicms.com/ 通用
|
|
|
private void sendGetRequestHz(String productBizId,String busiId,String url,String companyName){
|
|
|
String responseStr = HttpClientThreeUtil.get(url,null);
|