diff --git a/src/main/java/com/kiisoo/ic/customer/controller/CustomerViewController.java b/src/main/java/com/kiisoo/ic/customer/controller/CustomerViewController.java index aeaff77..3eccf3c 100644 --- a/src/main/java/com/kiisoo/ic/customer/controller/CustomerViewController.java +++ b/src/main/java/com/kiisoo/ic/customer/controller/CustomerViewController.java @@ -107,31 +107,6 @@ public class CustomerViewController extends BaseController { } } - /** - * 全量同步总数 - * @return 客户概览VO - */ - @RequestMapping(value = "/sync/all/count", method = RequestMethod.GET) - public void syncAllCount(){ - try{ - customerViewService.syncAllCount(); - }catch (Exception e){ - log.error("全量同步总数出错", e); - } - } - - /** - * 批量同步总数 - * @return 客户概览VO - */ - @RequestMapping(value = "/sync/alive/count", method = RequestMethod.GET) - public void syncAliveCount(){ - try{ - customerViewService.syncAliveCount(); - }catch (Exception e){ - log.error("批量同步总数出错", e); - } - } /** * 同步会员数据 diff --git a/src/main/java/com/kiisoo/ic/customer/service/CustomerViewService.java b/src/main/java/com/kiisoo/ic/customer/service/CustomerViewService.java index fe30606..1a8d1de 100644 --- a/src/main/java/com/kiisoo/ic/customer/service/CustomerViewService.java +++ b/src/main/java/com/kiisoo/ic/customer/service/CustomerViewService.java @@ -568,150 +568,6 @@ public class CustomerViewService { return result; } - public void syncAllCount() throws WxErrorException, InterruptedException { - //初始化线程 - ExecutorService newFixedThreadPool = Executors.newFixedThreadPool(8); - - //查询现有企业微信账号 - List privilageCpUserDOS = privilageCpUserDOMapper.selectList(null); - Map cpUserIdMap = new HashMap<>(); - for (PrivilageCpUserDO privilageCpUserDO : privilageCpUserDOS) { - cpUserIdMap.put(privilageCpUserDO.getCpUserId(),privilageCpUserDO); - } - WxCpService wxCpService = WxCpConfiguration.getCpService(APPLICATIONID); - WxCpExternalContactService externalContactService = wxCpService.getExternalContactService(); - //查询企业微信已配置联系我的用户 - List cpUserIds = externalContactService.listFollowUser(); - - if (CollectionUtils.isNotEmpty(cpUserIds)){ - //分组 - final List> afterPageList = com.kiisoo.ic.utils.CollectionUtils.portListByQuantity(cpUserIds, 100); - //定义线程池长度 - int threadPoolSize = afterPageList.size(); - //定义countDownLatch - final CountDownLatch countDownLatch = new CountDownLatch(threadPoolSize); - for (int i = 0; i < afterPageList.size(); i++) { - List ids = afterPageList.get(i); - newFixedThreadPool.execute(new Runnable() { - @Override - public void run() { - try { - for (String cpUserId : ids) { - List customerStrs; - try { - //获取客户联系人 - customerStrs = externalContactService.listExternalContacts(cpUserId); - }catch (Exception e){ - PrivilageCpUserDO privilageCpUserDO = cpUserIdMap.get(cpUserId); - if (privilageCpUserDO != null){ - privilageCpUserDO.setStatus(9); - privilageCpUserDOMapper.updateById(privilageCpUserDO); - } - continue; - } - if (CollectionUtils.isEmpty(customerStrs)){ - continue; - } - PrivilageCpUserDO privilageCpUserDO = cpUserIdMap.get(cpUserId); - if (privilageCpUserDO == null){ - //企业微信账号不存在,创建一个账号 - privilageCpUserDO = new PrivilageCpUserDO(); - privilageCpUserDO.setCpUserId(cpUserId); - privilageCpUserDO.setStatus(1); - privilageCpUserDOMapper.insert(privilageCpUserDO); - } - //批量添加账号 - for (String customerStr : customerStrs) { - CpUserCustomerRelationDO cpUserCustomerRelationDO = privilageCpUserDOMapper.selectCpUserCustomerRelation(customerStr, cpUserId, privilageCpUserDO.getId()); - if (cpUserCustomerRelationDO == null){ - privilageCpUserDOMapper.insertCpUserCustomerRelation(customerStr,cpUserId,privilageCpUserDO.getId()); - } - } - //移除已经请求过的数据库内账号 - cpUserIdMap.remove(cpUserId); - } - } catch (Exception e) { - log.error("同步客户明细", e); - } finally { - //每次减去一,避免死锁 - countDownLatch.countDown(); - } - } - }); - } - countDownLatch.await(); - Set removeCpUserIds = cpUserIdMap.keySet(); - for (String cpUserId:removeCpUserIds){ - PrivilageCpUserDO privilageCpUserDO = cpUserIdMap.get(cpUserId); - if (privilageCpUserDO != null){ - //删除 - privilageCpUserDOMapper.deleteById(privilageCpUserDO.getId()); - } - } - } - } - - public void syncAliveCount() throws WxErrorException, InterruptedException { - //初始化线程 - ExecutorService newFixedThreadPool = Executors.newFixedThreadPool(8); - - //查询现有企业微信账号 - List relations = privilageCpUserStoreDOMapper.selectList(null); - List ids = relations.stream().map(relation -> relation.getCpUserId()).collect(Collectors.toList()); - QueryWrapper qw = new QueryWrapper<>(); - qw.ne("status",9).in("id",ids); - List privilageCpUserDOS = privilageCpUserDOMapper.selectList(null); - WxCpService wxCpService = WxCpConfiguration.getCpService(APPLICATIONID); - WxCpExternalContactService externalContactService = wxCpService.getExternalContactService(); - - if (CollectionUtils.isNotEmpty(privilageCpUserDOS)){ - //分组 - final List> afterPageList = com.kiisoo.ic.utils.CollectionUtils.portListByQuantity(privilageCpUserDOS, 100); - //定义线程池长度 - int threadPoolSize = afterPageList.size(); - //定义countDownLatch - final CountDownLatch countDownLatch = new CountDownLatch(threadPoolSize); - for (int i = 0; i < afterPageList.size(); i++) { - List cpUserDOS = afterPageList.get(i); - newFixedThreadPool.execute(new Runnable() { - @Override - public void run() { - try { - //查询企业微信已配置联系我的用户 - for (PrivilageCpUserDO privilageCpUserDO : cpUserDOS) { - List customerStrs; - try { - //获取客户联系人 - customerStrs = externalContactService.listExternalContacts(privilageCpUserDO.getCpUserId()); - }catch (Exception e){ - privilageCpUserDO.setStatus(9); - privilageCpUserDOMapper.updateById(privilageCpUserDO); - continue; - } - if (CollectionUtils.isEmpty(customerStrs)){ - continue; - } - //批量添加账号 - for (String customerStr : customerStrs) { - CpUserCustomerRelationDO cpUserCustomerRelationDO = privilageCpUserDOMapper.selectCpUserCustomerRelation(customerStr, privilageCpUserDO.getCpUserId(), privilageCpUserDO.getId()); - if (cpUserCustomerRelationDO == null){ - privilageCpUserDOMapper.insertCpUserCustomerRelation(customerStr,privilageCpUserDO.getCpUserId(),privilageCpUserDO.getId()); - } - } - } - } catch (Exception e) { - log.error("同步客户明细", e); - } finally { - //每次减去一,避免死锁 - countDownLatch.countDown(); - } - } - }); - } - countDownLatch.await(); - } - } - /** * 同步会员数据 * @return diff --git a/src/main/java/com/kiisoo/ic/behavior/count/BehaviorCountDTOMessageFactory.java b/src/main/java/com/kiisoo/ic/job/behavior/BehaviorCountDTOMessageFactory.java similarity index 86% rename from src/main/java/com/kiisoo/ic/behavior/count/BehaviorCountDTOMessageFactory.java rename to src/main/java/com/kiisoo/ic/job/behavior/BehaviorCountDTOMessageFactory.java index 4a99555..5b4e792 100644 --- a/src/main/java/com/kiisoo/ic/behavior/count/BehaviorCountDTOMessageFactory.java +++ b/src/main/java/com/kiisoo/ic/job/behavior/BehaviorCountDTOMessageFactory.java @@ -1,4 +1,4 @@ -package com.kiisoo.ic.behavior.count; +package com.kiisoo.ic.job.behavior; import com.lmax.disruptor.EventFactory; diff --git a/src/main/java/com/kiisoo/ic/behavior/count/BehaviorDTOMessage.java b/src/main/java/com/kiisoo/ic/job/behavior/BehaviorDTOMessage.java similarity index 95% rename from src/main/java/com/kiisoo/ic/behavior/count/BehaviorDTOMessage.java rename to src/main/java/com/kiisoo/ic/job/behavior/BehaviorDTOMessage.java index 55ee0e0..d5e60fc 100644 --- a/src/main/java/com/kiisoo/ic/behavior/count/BehaviorDTOMessage.java +++ b/src/main/java/com/kiisoo/ic/job/behavior/BehaviorDTOMessage.java @@ -1,4 +1,4 @@ -package com.kiisoo.ic.behavior.count; +package com.kiisoo.ic.job.behavior; import com.kiisoo.ic.generalize.mapper.PoiCustomerContactDataStatMapper; import com.kiisoo.ic.store.mapper.PrivilageCpUserStoreDOMapper; diff --git a/src/main/java/com/kiisoo/ic/behavior/count/BehaviorDTOMessageEventProducer.java b/src/main/java/com/kiisoo/ic/job/behavior/BehaviorDTOMessageEventProducer.java similarity index 95% rename from src/main/java/com/kiisoo/ic/behavior/count/BehaviorDTOMessageEventProducer.java rename to src/main/java/com/kiisoo/ic/job/behavior/BehaviorDTOMessageEventProducer.java index 27a0316..c633645 100644 --- a/src/main/java/com/kiisoo/ic/behavior/count/BehaviorDTOMessageEventProducer.java +++ b/src/main/java/com/kiisoo/ic/job/behavior/BehaviorDTOMessageEventProducer.java @@ -1,6 +1,5 @@ -package com.kiisoo.ic.behavior.count; +package com.kiisoo.ic.job.behavior; -import com.kiisoo.ic.employee.mapper.PrivilageCpUserDOMapper; import com.kiisoo.ic.generalize.mapper.PoiCustomerContactDataStatMapper; import com.kiisoo.ic.store.mapper.PrivilageCpUserStoreDOMapper; import com.kiisoo.ic.store.mapper.StorePromotionDataDOMapper; diff --git a/src/main/java/com/kiisoo/ic/behavior/count/BehaviorDTOMessageGroupConsumer.java b/src/main/java/com/kiisoo/ic/job/behavior/BehaviorDTOMessageGroupConsumer.java similarity index 99% rename from src/main/java/com/kiisoo/ic/behavior/count/BehaviorDTOMessageGroupConsumer.java rename to src/main/java/com/kiisoo/ic/job/behavior/BehaviorDTOMessageGroupConsumer.java index 4afa622..656ffb0 100644 --- a/src/main/java/com/kiisoo/ic/behavior/count/BehaviorDTOMessageGroupConsumer.java +++ b/src/main/java/com/kiisoo/ic/job/behavior/BehaviorDTOMessageGroupConsumer.java @@ -1,4 +1,4 @@ -package com.kiisoo.ic.behavior.count; +package com.kiisoo.ic.job.behavior; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; diff --git a/src/main/java/com/kiisoo/ic/behavior/count/CustomerBehaviorJob.java b/src/main/java/com/kiisoo/ic/job/behavior/CustomerBehaviorJob.java similarity index 98% rename from src/main/java/com/kiisoo/ic/behavior/count/CustomerBehaviorJob.java rename to src/main/java/com/kiisoo/ic/job/behavior/CustomerBehaviorJob.java index ac60d01..7b62519 100644 --- a/src/main/java/com/kiisoo/ic/behavior/count/CustomerBehaviorJob.java +++ b/src/main/java/com/kiisoo/ic/job/behavior/CustomerBehaviorJob.java @@ -1,4 +1,4 @@ -package com.kiisoo.ic.behavior.count; +package com.kiisoo.ic.job.behavior; import com.kiisoo.ic.employee.entity.PrivilageCpUserDO; import com.kiisoo.ic.employee.mapper.PrivilageCpUserDOMapper; diff --git a/src/main/java/com/kiisoo/ic/store/service/StorePromotionDataJob.java b/src/main/java/com/kiisoo/ic/job/behavior/StorePromotionDataJob.java similarity index 72% rename from src/main/java/com/kiisoo/ic/store/service/StorePromotionDataJob.java rename to src/main/java/com/kiisoo/ic/job/behavior/StorePromotionDataJob.java index da441a7..224f546 100644 --- a/src/main/java/com/kiisoo/ic/store/service/StorePromotionDataJob.java +++ b/src/main/java/com/kiisoo/ic/job/behavior/StorePromotionDataJob.java @@ -1,5 +1,6 @@ -package com.kiisoo.ic.store.service; +package com.kiisoo.ic.job.behavior; +import com.kiisoo.ic.store.service.StorePromotionDataService; import com.kiisoo.ic.utils.DateUtils; import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.handler.IJobHandler; @@ -28,17 +29,13 @@ public class StorePromotionDataJob { * 客流定时任务 service */ @Autowired - private StorePromotionDataService storePromotionDataService; + private CustomerBehaviorJob customerBehaviorJob; @Scheduled(cron = "0 0 1 * * ?") public void syncData(){ try { log.info("<--获取联系客户统计数据定时任务执行-->"); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); - List getdays = DateUtils.getdays(DateUtils.addDay(new Date(),-3), DateUtils.addDay(new Date(),-1)); - for (Date date:getdays){ - storePromotionDataService.syncCustomerBlackListByDate(date,date); - } + customerBehaviorJob.handle(DateUtils.addDay(new Date(),-3),DateUtils.addDay(new Date(),-1)); log.info("<--获取联系客户统计数据定时任务结束-->"); } catch (Exception e) { log.error("获取联系客户统计数据任务出错", e); diff --git a/src/main/java/com/kiisoo/ic/behavior/count/SyncBehaviorJobController.java b/src/main/java/com/kiisoo/ic/job/behavior/SyncBehaviorJobController.java similarity index 93% rename from src/main/java/com/kiisoo/ic/behavior/count/SyncBehaviorJobController.java rename to src/main/java/com/kiisoo/ic/job/behavior/SyncBehaviorJobController.java index 0770ea9..2b96b85 100644 --- a/src/main/java/com/kiisoo/ic/behavior/count/SyncBehaviorJobController.java +++ b/src/main/java/com/kiisoo/ic/job/behavior/SyncBehaviorJobController.java @@ -1,4 +1,4 @@ -package com.kiisoo.ic.behavior.count; +package com.kiisoo.ic.job.behavior; import java.text.SimpleDateFormat; import lombok.extern.slf4j.Slf4j; @@ -8,8 +8,6 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; -import java.util.Date; - @Controller @RequestMapping("/job") @Slf4j diff --git a/src/main/java/com/kiisoo/ic/store/service/StorePromotionDataService.java b/src/main/java/com/kiisoo/ic/store/service/StorePromotionDataService.java index 42038a1..6718a30 100644 --- a/src/main/java/com/kiisoo/ic/store/service/StorePromotionDataService.java +++ b/src/main/java/com/kiisoo/ic/store/service/StorePromotionDataService.java @@ -287,184 +287,6 @@ public class StorePromotionDataService { } } - /** - * 同步企业微信的拉黑和新增客户信息 - * - * @throws Exception - */ - @Transactional(rollbackFor = Exception.class) - public void syncCustomerBlackList() throws Exception { - Date startDate = DateUtils.addDay(new Date(), -1); - Date endDate = DateUtils.addDay(new Date(), -1); - //获取token - String token = mainService.getAccessToken(); - List cusList = storePromotionDataDOMapper.selectCustomer(); - cusList.forEach(customer -> { - // 返回 - try { - String userId = customer.getUserId(); - WxCusInfoReqDO wxCusInfoReqDO = new WxCusInfoReqDO(); - wxCusInfoReqDO.setAccess_token(token); - wxCusInfoReqDO.setUserid(userId); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); - //todo 分开写便于同步历史数据 最大跨度30天 最久当天往前180天 上线时改为System.currentTimeMillis() - wxCusInfoReqDO.setStart_time(startDate.getTime() / 1000); - wxCusInfoReqDO.setEnd_time(endDate.getTime() / 1000); - WxCusInfoRespDO wxCusInfoRespDO = getWxCusInfo(wxCusInfoReqDO); - if (wxCusInfoRespDO == null) { - return; - } - wxCusInfoRespDO.setStoreId(customer.getStoreId()); - wxCusInfoRespDO.setStatTime(startDate); - - QueryWrapper qw = new QueryWrapper(); - qw.eq("store_id", customer.getStoreId()).eq("stat_time", startDate).last("limit 1"); - PoiCustomerContactDataStat poiCustomerContactDataStat = poiCustomerContactDataStatMapper.selectOne(qw); - int syncRes = 0; - if (poiCustomerContactDataStat == null) { - syncRes = storePromotionDataDOMapper.insertStorePromotionData(wxCusInfoRespDO); - } else { - Long newApplyCnt = 0L; - if (wxCusInfoRespDO.getNew_apply_cnt() != null) { - newApplyCnt = new Long(wxCusInfoRespDO.getNew_apply_cnt()); - } - poiCustomerContactDataStat.setNewApplyCnt(newApplyCnt); - - Long avgReplyTime = 0L; - if (wxCusInfoRespDO.getAvg_reply_time() != null) { - avgReplyTime = new Long(wxCusInfoRespDO.getAvg_reply_time()); - } - poiCustomerContactDataStat.setAvgReplyTime(avgReplyTime); - - Long chatCny = 0L; - if (wxCusInfoRespDO.getChat_cnt() != null) { - chatCny = new Long(wxCusInfoRespDO.getChat_cnt()); - } - poiCustomerContactDataStat.setChatCnt(chatCny); - - Long messageCnt = 0L; - if (wxCusInfoRespDO.getMessage_cnt() != null) { - messageCnt = new Long(wxCusInfoRespDO.getMessage_cnt()); - } - poiCustomerContactDataStat.setMessageCnt(messageCnt); - - Float replyPercentage = 0F; - if (wxCusInfoRespDO.getReply_percentage() != null) { - replyPercentage = wxCusInfoRespDO.getReply_percentage(); - } - poiCustomerContactDataStat.setReplyPercentage(replyPercentage); - - Long newContactCnt = 0L; - if (wxCusInfoRespDO.getNew_contact_cnt() != null) { - newContactCnt = new Long(wxCusInfoRespDO.getNew_contact_cnt()); - } - poiCustomerContactDataStat.setNewContactCnt(newContactCnt); - - Long negativeFeedbackCnt = 0L; - if (wxCusInfoRespDO.getNegative_feedback_cnt() != null) { - negativeFeedbackCnt = new Long(wxCusInfoRespDO.getNegative_feedback_cnt()); - } - poiCustomerContactDataStat.setNegativeFeedbackCnt(negativeFeedbackCnt); - - syncRes = poiCustomerContactDataStatMapper.updateById(poiCustomerContactDataStat); - } - - if (syncRes == Constants.INSERT_FAIL) { - throw new RuntimeException("向数据库导入客户统计数据时出错"); - } - } catch (Exception e) { - log.error("请求企业微信api获取客户统计数据或日期转换出错!", e); - } - }); - } - - public void syncCustomerBlackListByDate(Date startDate, Date endDate) throws Exception { - //获取token - String token = mainService.getAccessToken(); - List privilageCpUserDOS = privilageCpUserDOMapper.selectList(null); - privilageCpUserDOS.forEach(privilageCpUserDO -> { - // 返回 - try { - Long storeId = privilageCpUserStoreDOMapper.selectOneByCpUserId(privilageCpUserDO.getCpUserId()); - Long regionId = null; - if (storeId == null){ - regionId = privilageCpUserDO.getId(); - } - WxCusInfoReqDO wxCusInfoReqDO = new WxCusInfoReqDO(); - wxCusInfoReqDO.setAccess_token(token); - wxCusInfoReqDO.setUserid(privilageCpUserDO.getCpUserId()); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); - //todo 分开写便于同步历史数据 最大跨度30天 最久当天往前180天 上线时改为System.currentTimeMillis() - wxCusInfoReqDO.setStart_time(startDate.getTime() / 1000); - wxCusInfoReqDO.setEnd_time(endDate.getTime() / 1000); - WxCusInfoRespDO wxCusInfoRespDO = getWxCusInfo(wxCusInfoReqDO); - if (wxCusInfoRespDO == null) { - return; - } - wxCusInfoRespDO.setStoreId(storeId); - wxCusInfoRespDO.setRegionId(regionId); - wxCusInfoRespDO.setStatTime(startDate); - - QueryWrapper qw = new QueryWrapper(); - qw.eq("store_id", storeId).eq("region_id", regionId).eq("stat_time", startDate).last("limit 1"); - PoiCustomerContactDataStat poiCustomerContactDataStat = poiCustomerContactDataStatMapper.selectOne(qw); - int syncRes = 0; - if (poiCustomerContactDataStat == null) { - syncRes = storePromotionDataDOMapper.insertStorePromotionData(wxCusInfoRespDO); - } else { - Long newApplyCnt = 0L; - if (wxCusInfoRespDO.getNew_apply_cnt() != null) { - newApplyCnt = new Long(wxCusInfoRespDO.getNew_apply_cnt()); - } - poiCustomerContactDataStat.setNewApplyCnt(newApplyCnt); - - Long avgReplyTime = 0L; - if (wxCusInfoRespDO.getAvg_reply_time() != null) { - avgReplyTime = new Long(wxCusInfoRespDO.getAvg_reply_time()); - } - poiCustomerContactDataStat.setAvgReplyTime(avgReplyTime); - - Long chatCny = 0L; - if (wxCusInfoRespDO.getChat_cnt() != null) { - chatCny = new Long(wxCusInfoRespDO.getChat_cnt()); - } - poiCustomerContactDataStat.setChatCnt(chatCny); - - Long messageCnt = 0L; - if (wxCusInfoRespDO.getMessage_cnt() != null) { - messageCnt = new Long(wxCusInfoRespDO.getMessage_cnt()); - } - poiCustomerContactDataStat.setMessageCnt(messageCnt); - - Float replyPercentage = 0F; - if (wxCusInfoRespDO.getReply_percentage() != null) { - replyPercentage = wxCusInfoRespDO.getReply_percentage(); - } - poiCustomerContactDataStat.setReplyPercentage(replyPercentage); - - Long newContactCnt = 0L; - if (wxCusInfoRespDO.getNew_contact_cnt() != null) { - newContactCnt = new Long(wxCusInfoRespDO.getNew_contact_cnt()); - } - poiCustomerContactDataStat.setNewContactCnt(newContactCnt); - - Long negativeFeedbackCnt = 0L; - if (wxCusInfoRespDO.getNegative_feedback_cnt() != null) { - negativeFeedbackCnt = new Long(wxCusInfoRespDO.getNegative_feedback_cnt()); - } - poiCustomerContactDataStat.setNegativeFeedbackCnt(negativeFeedbackCnt); - - syncRes = poiCustomerContactDataStatMapper.updateById(poiCustomerContactDataStat); - } - - if (syncRes == Constants.INSERT_FAIL) { - throw new RuntimeException("向数据库导入客户统计数据时出错"); - } - } catch (Exception e) { - log.error("请求企业微信api获取客户统计数据或日期转换出错!", e); - } - }); - } public PageInfo listUserBehaviorData(Long userId,Long companyId,Long shopId,Date startDate, Date endDate,Integer pageNum,Integer pageSize){ Set shopIds = new HashSet<>(); @@ -512,21 +334,6 @@ public class StorePromotionDataService { } - /** - * 获取联系客户统计数据 - * - * @param wxCusInfoReqDO - * @return - * @throws WxErrorException - */ - public WxCusInfoRespDO getWxCusInfo(WxCusInfoReqDO wxCusInfoReqDO) throws WxErrorException { - String url = mainService.getWxCpConfigStorage().getApiUrl("/cgi-bin/externalcontact/get_user_behavior_data"); - String result = mainService.post(url, wxCusInfoReqDO.toJson()); - JSONObject parseObject = JSON.parseObject(result); - String[] behavior_data = JSONObject.parseObject(parseObject.getString("behavior_data"), String[].class); - return JSONObject.parseObject(behavior_data[0], WxCusInfoRespDO.class); - } - /** * 获取联系客户统计数据 *