Commit 8fdb47f3 by 朱海

[chg]增加日志

1 parent bd305ef6
...@@ -96,7 +96,8 @@ public class PersonService { ...@@ -96,7 +96,8 @@ public class PersonService {
if (poolId != null) { if (poolId != null) {
poolIds.add(poolId); poolIds.add(poolId);
} }
log.info("人员匹配操作开始,PoolIds:[{}]", poolIds); log.info("人员匹配操作开始,PoolIds:[{}],rid:{}", poolIds, rid);
long startTime = System.currentTimeMillis();
try { try {
String[] indices = poolIds.toArray(new String[poolIds.size()]); String[] indices = poolIds.toArray(new String[poolIds.size()]);
SearchRequest request = new SearchRequest(indices); SearchRequest request = new SearchRequest(indices);
...@@ -145,7 +146,7 @@ public class PersonService { ...@@ -145,7 +146,7 @@ public class PersonService {
ResponseVo result = ResponseVo.success(rid, "success"); ResponseVo result = ResponseVo.success(rid, "success");
result.setCount(count); result.setCount(count);
log.info("rid:{} CountMatchPerson完成,PoolIds:[{}],count:{}", rid, poolIds, count); log.info("rid:{} CountMatchPerson完成,PoolIds:[{}],count:{},耗时:{}", rid, poolIds, count, System.currentTimeMillis() - startTime);
return result; return result;
} catch (ElasticsearchStatusException e) { } catch (ElasticsearchStatusException e) {
ResponseVo error = ResponseVo.error(rid, e.getDetailedMessage()); ResponseVo error = ResponseVo.error(rid, e.getDetailedMessage());
...@@ -180,6 +181,7 @@ public class PersonService { ...@@ -180,6 +181,7 @@ public class PersonService {
poolIds.add(poolId); poolIds.add(poolId);
} }
log.info("人员匹配操作开始,PoolIds:[{}],rid:{}", poolIds, rid); log.info("人员匹配操作开始,PoolIds:[{}],rid:{}", poolIds, rid);
long startTime = System.currentTimeMillis();
try { try {
for (String id : poolIds) { for (String id : poolIds) {
Pool pool = new Pool(); Pool pool = new Pool();
...@@ -204,7 +206,7 @@ public class PersonService { ...@@ -204,7 +206,7 @@ public class PersonService {
} }
success.setMatch(1); success.setMatch(1);
success.setPersonPoolStatus(poolStatus); success.setPersonPoolStatus(poolStatus);
log.info("人员匹配操作完成,PoolIds:[{}}, {},rid:{}", poolIds, JSON.toJSONString(poolStatus), rid); log.info("人员匹配操作完成,PoolIds:{}, poolStatus:{},rid:{},耗时:{}", poolIds, JSON.toJSONString(poolStatus), rid, System.currentTimeMillis() - startTime);
return success; return success;
} catch (ElasticsearchStatusException e) { } catch (ElasticsearchStatusException e) {
if (e.status() == RestStatus.BAD_REQUEST && e.getDetailedMessage().contains(Constant.CLASS_CAST_EXCEPTION)) { if (e.status() == RestStatus.BAD_REQUEST && e.getDetailedMessage().contains(Constant.CLASS_CAST_EXCEPTION)) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!