寻找报错
parent
8551515a2f
commit
7e88695376
|
@ -31,6 +31,7 @@ import javax.annotation.Resource;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import static com.muyu.task.server.thread.OptimizedPrioritizedThreadPool.*;
|
import static com.muyu.task.server.thread.OptimizedPrioritizedThreadPool.*;
|
||||||
|
|
||||||
|
@ -253,6 +254,11 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
|
||||||
submitHighPriorityTask(()->{
|
submitHighPriorityTask(()->{
|
||||||
getString(pageNum, finalFieName, finalJoint,basicId,newBasicId,tableId,map,num);
|
getString(pageNum, finalFieName, finalJoint,basicId,newBasicId,tableId,map,num);
|
||||||
});
|
});
|
||||||
|
try {
|
||||||
|
TimeUnit.MILLISECONDS.sleep(100); // 适当延迟,避免所有任务同时提交
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Weight.centre.getValue().equals(weight)){
|
if (Weight.centre.getValue().equals(weight)){
|
||||||
|
@ -304,9 +310,9 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
|
||||||
@NotNull
|
@NotNull
|
||||||
private void getString(Long pageNum,String fieName,String joint,Long basicId,Long newBasicId,Long tableId,HashMap<String, String> map ,Integer num) {
|
private void getString(Long pageNum,String fieName,String joint,Long basicId,Long newBasicId,Long tableId,HashMap<String, String> map ,Integer num) {
|
||||||
String sqlSelect = " SELECT " + fieName + " FROM " + joint +" limit "+pageNum +","+PAGE_SIZE;
|
String sqlSelect = " SELECT " + fieName + " FROM " + joint +" limit "+pageNum +","+PAGE_SIZE;
|
||||||
//log.info(sqlSelect);
|
log.info(sqlSelect);
|
||||||
|
|
||||||
//log.info("执行{}查询的方法",sqlSelect);
|
log.info("执行{}查询的方法",sqlSelect);
|
||||||
Result<DataValue[][]> tableValueResult = datasourceFeign.findTableValueToArray(basicId, sqlSelect);
|
Result<DataValue[][]> tableValueResult = datasourceFeign.findTableValueToArray(basicId, sqlSelect);
|
||||||
DataValue[][] data = tableValueResult.getData();
|
DataValue[][] data = tableValueResult.getData();
|
||||||
// if (pageNum==160000){
|
// if (pageNum==160000){
|
||||||
|
@ -323,10 +329,10 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
|
||||||
dataValue.setKey(newKey);
|
dataValue.setKey(newKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//log.info("{}查询结束",sqlSelect);
|
log.info("{}查询结束",sqlSelect);
|
||||||
//log.info("执行{}添加的方法",sqlSelect);
|
log.info("执行{}添加的方法",sqlSelect);
|
||||||
Result result = datasourceFeign.addProduct(newBasicId, tableId, data);
|
Result result = datasourceFeign.addProduct(newBasicId, tableId, data);
|
||||||
//log.info("{}添加结束",sqlSelect);
|
log.info("{}添加结束",sqlSelect);
|
||||||
// for (List<DataValue> dataValues : tableValue) {
|
// for (List<DataValue> dataValues : tableValue) {
|
||||||
// for (DataValue dataValue : dataValues) {
|
// for (DataValue dataValue : dataValues) {
|
||||||
// String key = dataValue.getKey();
|
// String key = dataValue.getKey();
|
||||||
|
|
Loading…
Reference in New Issue