Commit 252b35af authored by suhuiguang's avatar suhuiguang

1.压测优化

parent 94192156
......@@ -193,6 +193,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
private static String ORG_BRANCH_CODE = "supervise_org_code";
private ExecutorService threadPool = Executors.newCachedThreadPool();
/**
* 分页查询
*/
......@@ -1389,23 +1391,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if (log.isInfoEnabled()) {
log.info("通用提交耗时:{} 秒", stopWatch3.getTotalTimeSeconds());
}
StopWatch stopWatch5 = new StopWatch();
stopWatch5.start();
ExecutorService threadPool = Executors.newCachedThreadPool();
threadPool.submit(new Runnable() {
@Override
public void run() {
threadPool.submit(() -> {
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);
}
// updateEquipmentCategoryData(unitCode);
});
stopWatch5.stop();
if (log.isInfoEnabled()) {
log.info("异步操作耗时:{} 秒", stopWatch5.getTotalTimeSeconds());
}
} catch (Exception e) {
log.error(e.getMessage(), e);
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