Commit 252b35af authored by suhuiguang's avatar suhuiguang

1.压测优化

parent 94192156
...@@ -193,6 +193,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -193,6 +193,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
private static String ORG_BRANCH_CODE = "supervise_org_code"; private static String ORG_BRANCH_CODE = "supervise_org_code";
private ExecutorService threadPool = Executors.newCachedThreadPool();
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -1389,23 +1391,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1389,23 +1391,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if (log.isInfoEnabled()) { if (log.isInfoEnabled()) {
log.info("通用提交耗时:{} 秒", stopWatch3.getTotalTimeSeconds()); log.info("通用提交耗时:{} 秒", stopWatch3.getTotalTimeSeconds());
} }
StopWatch stopWatch5 = new StopWatch(); threadPool.submit(() -> {
stopWatch5.start(); log.info("已生成对应监管码" + supervisionMap.get("SUPERVISORY_CODE"));
ExecutorService threadPool = Executors.newCachedThreadPool(); log.info("已生成对应96333电梯识别码" + supervisionMap.get("CODE96333"));
threadPool.submit(new Runnable() { supervisoryCodeInfoMapper.update(supervisoryCodeInfo, new QueryWrapper<SupervisoryCodeInfo>().eq("supervisory_code", supervisionMap.get("SUPERVISORY_CODE")));
@Override log.info("unitCode-------->>>>>>>>>>{}", unitCode);
public void run() { // updateEquipmentCategoryData(unitCode);
log.info("已生成对应监管码" + supervisionMap.get("SUPERVISORY_CODE"));
log.info("已生成对应96333电梯识别码" + supervisionMap.get("CODE96333"));
supervisoryCodeInfoMapper.update(supervisoryCodeInfo, new QueryWrapper<SupervisoryCodeInfo>().eq("supervisory_code", supervisionMap.get("SUPERVISORY_CODE")));
log.info("unitCode-------->>>>>>>>>>{}", unitCode);
updateEquipmentCategoryData(unitCode);
}
}); });
stopWatch5.stop();
if (log.isInfoEnabled()) {
log.info("异步操作耗时:{} 秒", stopWatch5.getTotalTimeSeconds());
}
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
equipmentCategoryMapper.updateIsNotEs(String.valueOf(supervisionMap.get("SUPERVISORY_CODE"))); equipmentCategoryMapper.updateIsNotEs(String.valueOf(supervisionMap.get("SUPERVISORY_CODE")));
......
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