mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-11 11:56:50 +08:00
提交耗时日志输出
This commit is contained in:
@@ -85,8 +85,10 @@ public class CasesRecommendPushRecordServiceImpl implements ICasesRecommendPushR
|
||||
}
|
||||
// 组织
|
||||
if (CollectionUtil.isNotEmpty(casesRecommendLaunch.getDeptIds())) {
|
||||
long tt = System.currentTimeMillis();
|
||||
for (String orgId : casesRecommendLaunch.getDeptIds()) {
|
||||
List<OrgRootBean.ResultData> orgChildTree = thirdApi.getOrgChildTree(orgId, token);
|
||||
log.info("查询组织数据耗时 {}秒", (System.currentTimeMillis() - tt) / 1000);
|
||||
if (CollectionUtil.isNotEmpty(orgChildTree)) {
|
||||
for (OrgRootBean.ResultData result : orgChildTree) {
|
||||
UserListParam build = UserListParam.builder().departId(result.getId()).pageSize(100).build();
|
||||
@@ -98,16 +100,20 @@ public class CasesRecommendPushRecordServiceImpl implements ICasesRecommendPushR
|
||||
}
|
||||
}
|
||||
}
|
||||
log.info("{} 机构查询耗时 {}秒", orgId, (System.currentTimeMillis()) / 1000);
|
||||
}
|
||||
log.info("组织查询耗时 {}秒", (System.currentTimeMillis() - tt) / 1000);
|
||||
}
|
||||
// 受众关联
|
||||
if (CollectionUtil.isNotEmpty(casesRecommendLaunch.getGroupIds())) {
|
||||
long t2 = System.currentTimeMillis();
|
||||
for (String groupId : casesRecommendLaunch.getGroupIds()) {
|
||||
List<AuditList> allAudienceList = thirdApi.getAllAudienceList(AuditListParam.builder().audienceId(groupId).pageSize(100).page(1).build(), token);
|
||||
if (CollectionUtil.isNotEmpty(allAudienceList)) {
|
||||
allAudienceList.forEach(auditList -> userIds.add(String.valueOf(auditList.getUserId())));
|
||||
}
|
||||
}
|
||||
log.info("耗时 受众查询 {}", (System.currentTimeMillis()) / 1000);
|
||||
}
|
||||
if (CollectionUtil.isEmpty(userIds)) {
|
||||
throw new RuntimeException("推荐人不能为空");
|
||||
|
||||
Reference in New Issue
Block a user