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 {
public R addDefaultCompany() {
//获取所有供应商企业名称
List<Integer> idList = new ArrayList<>();
//如果没有上一次的企业id数据则直接返回
if (RedisUtils.hasKey("monitorCompanyList")){
log.info("添加默认企业监控:企业id从缓存中取");
idList = RedisUtils.getCacheList("monitorCompanyList");
}else {
List<String> list = customerMapper.allSearchCompanyNameList();
for (String companyName : list) {
//循环匹配 得到能关联上的企业id
Map<String, Object> map = opportunityRadarService.enterpriseByName(companyName);
if (!ObjectUtils.isEmpty(map.get("data"))) {
Map<String, Object> data = BeanUtil.beanToMap(map.get("data"));
Integer companyId = MapUtil.getInt(data, "jskEid");
idList.add(companyId);
}
}
RedisUtils.setCacheList("monitorCompanyList",idList);
//设置过期时间两天
RedisUtils.expire("monitorCompanyList",172800);
}
idList.add(3068);
// //如果没有上一次的企业id数据则直接返回
// if (RedisUtils.hasKey("monitorCompanyList")){
// log.info("添加默认企业监控:企业id从缓存中取");
// idList = RedisUtils.getCacheList("monitorCompanyList");
// }else {
// List<String> list = customerMapper.allSearchCompanyNameList();
// for (String companyName : list) {
// //循环匹配 得到能关联上的企业id
// Map<String, Object> map = opportunityRadarService.enterpriseByName(companyName);
// if (!ObjectUtils.isEmpty(map.get("data"))) {
// Map<String, Object> data = BeanUtil.beanToMap(map.get("data"));
// Integer companyId = MapUtil.getInt(data, "jskEid");
// idList.add(companyId);
// }
// }
// RedisUtils.setCacheList("monitorCompanyList",idList);
// //设置过期时间两天
// RedisUtils.expire("monitorCompanyList",172800);
// }
PushMonitorCompanyAddVo addVo = new PushMonitorCompanyAddVo();
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