|
@@ -173,6 +173,15 @@ public class CasllBackDataProcessor implements CallBackService {
|
|
|
// sendGetRequestHeiLongJiang(commercialCallBackReadyEnum.getCode(),
|
|
|
// commercialCallBackReadyEnum.getBusid(),commercialCallBackReadyEnum.getUrl(), md5ListHLJJC);
|
|
|
// break;
|
|
|
+ case Commercial_CQYXJ:
|
|
|
+ List<String> md5ListCQYXJ = callBackMap.get(productBizId);
|
|
|
+ log.info("开始处理机构id:{},重庆优兴嘉 当日订单数:{},条数:{}", productBizId,md5ListCQYXJ,md5ListCQYXJ.size());
|
|
|
+ if (CollectionUtils.isEmpty(md5ListCQYXJ)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ sendGetRequestCQYXJ(commercialCallBackReadyEnum.getCode(),
|
|
|
+ commercialCallBackReadyEnum.getBusid(),commercialCallBackReadyEnum.getUrl(),md5ListCQYXJ,"1D4C6329-399F-42CA-AC0C-236E0B048AD0",21540);
|
|
|
+ break;
|
|
|
case Commercial_SXRKX:
|
|
|
List<String> md5ListSXRKX = callBackMap.get(productBizId);
|
|
|
log.info("开始处理机构id:{},山西瑞凯鑫 当日订单数:{},条数:{}", productBizId,md5ListSXRKX,md5ListSXRKX.size());
|
|
@@ -301,7 +310,66 @@ public class CasllBackDataProcessor implements CallBackService {
|
|
|
log.info("busiId:{} 山西瑞凯鑫 处理数据条:{}", busiId, followupList.size());
|
|
|
handleMappedData(busiId,followupList);
|
|
|
}
|
|
|
+ private void sendGetRequestCQYXJ(String productBizId,String busiId,String url,List<String> md5ListCQYXJ,String accessKey,Integer channelType){
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ jsonObject.put("accessKey", accessKey);
|
|
|
+ jsonObject.put("channelType", channelType);
|
|
|
+ jsonObject.put("phoneMd5List", md5ListCQYXJ);
|
|
|
+ String jsonString = JSON.toJSONString(jsonObject);
|
|
|
+ log.info("busiId:{},:重庆优兴嘉 jsonString:{}" ,busiId, jsonString);
|
|
|
+
|
|
|
+ String responseStr = HttpClientThreeUtil.post(url, jsonString);
|
|
|
+ JSONObject response = JSON.parseObject(responseStr);
|
|
|
+ String code = response.getString("code");
|
|
|
+ if (!"200".equals(code)) {
|
|
|
+ log.info("重庆优兴嘉 返回数据错误: " + response.getString("msg"));
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ JSONArray dataArray = response.getJSONArray("data");
|
|
|
+ List<CustomerFollowup> followupList = new ArrayList<>();
|
|
|
+ if (CollectionUtils.isEmpty(dataArray)) {
|
|
|
+ log.info("busiId:{},:重庆优兴嘉 今天没有星级数据",busiId);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ for (int i = 0; i < dataArray.size(); i++) {
|
|
|
+ JSONObject obj = dataArray.getJSONObject(i);
|
|
|
+ CustomerFollowup followup = new CustomerFollowup();
|
|
|
+ followup.setPhoneMd5(obj.getString("phoneMd5"));
|
|
|
+ followup.setBusiId(busiId);
|
|
|
+ followup.setProductBizId(Integer.parseInt(productBizId));
|
|
|
+ followup.setFollowTime(new Date());
|
|
|
+ followup.setSourceType(3);
|
|
|
+ String star = obj.getString("grade");
|
|
|
+ if (StringUtils.isEmpty(star)) {
|
|
|
+ log.info("busiId:{} 重庆优兴嘉 mobile_md5{} 没有填星级:", busiId, 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));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ followupList.add(followup);
|
|
|
+ }
|
|
|
|
|
|
+ if (CollectionUtils.isEmpty(followupList)) {
|
|
|
+ log.info("busiId:{} 重庆优兴嘉 无星级数据", busiId);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ log.info("busiId:{} 重庆优兴嘉 处理数据条:{}", busiId, followupList.size());
|
|
|
+ handleMappedData(busiId,followupList);
|
|
|
+
|
|
|
+ }
|
|
|
private void sendGetRequestFoShan(String productBizId,String busiId,String url,List<String> md5ListFS){
|
|
|
List<Map<String, String>> jsonList = new ArrayList<>();
|
|
|
for (String md5 : md5ListFS) {
|