测试线程池

master
陈思豪 2024-09-09 00:08:28 +08:00
parent bcb5ed7691
commit 49bcab3824
1 changed files with 4 additions and 11 deletions

View File

@ -7,11 +7,9 @@ import com.muyu.common.core.utils.StringUtils;
import com.muyu.domain.*; import com.muyu.domain.*;
import com.muyu.domain.req.TaskInfoReq; import com.muyu.domain.req.TaskInfoReq;
import com.muyu.mapper.TaskMapper; import com.muyu.mapper.TaskMapper;
import com.muyu.service.TaskInputService; import com.muyu.service.*;
import com.muyu.service.TaskJoinService;
import com.muyu.service.TaskOutputService;
import com.muyu.service.TaskService;
import com.muyu.task.feign.DataValueClient; import com.muyu.task.feign.DataValueClient;
import com.muyu.task.feign.RuleFeign;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -234,7 +232,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskInfo> implement
long firstArray = 0L; long firstArray = 0L;
int totalSegments = (int) Math.ceil((double) count / pageSize); int totalSegments = (int) Math.ceil((double) count / pageSize);
for (int i = 0; i < totalSegments; i++) { for (int i = 0; i < totalSegments; i++) {
log.info("调用第{}次", i); log.info("当前页为{}", i);
String limit = " limit " + i * pageSize + "," + pageSize; String limit = " limit " + i * pageSize + "," + pageSize;
firstArray = Math.min(pageSize, count - i * pageSize); firstArray = Math.min(pageSize, count - i * pageSize);
if (firstArray >= pageSize) { if (firstArray >= pageSize) {
@ -247,13 +245,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskInfo> implement
log.info("远程调用完毕,调用数量{}",tableValue.length); log.info("远程调用完毕,调用数量{}",tableValue.length);
for (DataValue[] dataValues : tableValue) { for (DataValue[] dataValues : tableValue) {
for (DataValue dataValue : dataValues) { for (DataValue dataValue : dataValues) {
log.info(dataValue.toString());
String key = dataValue.getKey(); String key = dataValue.getKey();
log.info("传来的值的键为{}",key);
String newKey = newAndOldMap.get(key); String newKey = newAndOldMap.get(key);
log.info("取出来的值的键为{}",newKey);
log.info("新的目标字段{}",newKey);
log.info("通过map字段取到的值为{}", newKey);
dataValue.setKey(newKey); dataValue.setKey(newKey);
} }
} }
@ -350,7 +343,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskInfo> implement
// @Autowired // @Autowired
// private NodeRuleService nodeRuleService; // private NodeRuleService nodeRuleService;
//
// @Autowired // @Autowired
// private RuleFeign ruleFeign; // private RuleFeign ruleFeign;