Commit c4270bd8 authored by Administrator's avatar Administrator

-

Signed-off-by: Administrator's avatarAdministrator <admin@example.com>
parent d185a98a
...@@ -343,26 +343,27 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -343,26 +343,27 @@ public class MonitorServiceImpl implements MonitorService {
public R addDefaultCompany() { public R addDefaultCompany() {
//获取所有供应商企业名称 //获取所有供应商企业名称
List<Integer> idList = new ArrayList<>(); List<Integer> idList = new ArrayList<>();
idList.add(3068);
//如果没有上一次的企业id数据则直接返回
if (RedisUtils.hasKey("monitorCompanyList")){ // //如果没有上一次的企业id数据则直接返回
log.info("添加默认企业监控:企业id从缓存中取"); // if (RedisUtils.hasKey("monitorCompanyList")){
idList = RedisUtils.getCacheList("monitorCompanyList"); // log.info("添加默认企业监控:企业id从缓存中取");
}else { // idList = RedisUtils.getCacheList("monitorCompanyList");
List<String> list = customerMapper.allSearchCompanyNameList(); // }else {
for (String companyName : list) { // List<String> list = customerMapper.allSearchCompanyNameList();
//循环匹配 得到能关联上的企业id // for (String companyName : list) {
Map<String, Object> map = opportunityRadarService.enterpriseByName(companyName); // //循环匹配 得到能关联上的企业id
if (!ObjectUtils.isEmpty(map.get("data"))) { // Map<String, Object> map = opportunityRadarService.enterpriseByName(companyName);
Map<String, Object> data = BeanUtil.beanToMap(map.get("data")); // if (!ObjectUtils.isEmpty(map.get("data"))) {
Integer companyId = MapUtil.getInt(data, "jskEid"); // Map<String, Object> data = BeanUtil.beanToMap(map.get("data"));
idList.add(companyId); // Integer companyId = MapUtil.getInt(data, "jskEid");
} // idList.add(companyId);
} // }
RedisUtils.setCacheList("monitorCompanyList",idList); // }
//设置过期时间两天 // RedisUtils.setCacheList("monitorCompanyList",idList);
RedisUtils.expire("monitorCompanyList",172800); // //设置过期时间两天
} // RedisUtils.expire("monitorCompanyList",172800);
// }
PushMonitorCompanyAddVo addVo = new PushMonitorCompanyAddVo(); PushMonitorCompanyAddVo addVo = new PushMonitorCompanyAddVo();
addVo.setSystemCode("ZJYJ"); addVo.setSystemCode("ZJYJ");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment