添加线程
parent
312663aff2
commit
ff705cc8ad
|
@ -230,30 +230,55 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
|
||||||
map.put(lastFieName[i], newFieName[i]);
|
map.put(lastFieName[i], newFieName[i]);
|
||||||
fieName += "," + tableNameMap.get(lastFieName[i]);
|
fieName += "," + tableNameMap.get(lastFieName[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
fieName = fieName.substring(1);
|
fieName = fieName.substring(1);
|
||||||
String sql = " SELECT count(1) FROM " + joint;
|
String sql = " SELECT count(1) FROM " + joint;
|
||||||
Result<Long> count = datasourceFeign.findCount(basicId, sql);
|
Result<Long> countResult = datasourceFeign.findCount(basicId, sql);
|
||||||
System.out.println("======="+count+"=======");
|
Long data = countResult.getData();
|
||||||
|
System.out.println("======="+data+"=======");
|
||||||
|
String finalFieName = fieName;
|
||||||
|
String finalJoint = joint;
|
||||||
if (Weight.high.equals(weight)){
|
if (Weight.high.equals(weight)){
|
||||||
|
long count = data/10000;
|
||||||
|
for (long i = 0; i < count; i++) {
|
||||||
|
long pageNum = (i - 1) * 10000;
|
||||||
submitHighPriorityTask(()->{
|
submitHighPriorityTask(()->{
|
||||||
|
getString(pageNum, finalFieName, finalJoint,basicId,newBasicId,tableId,map);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (Weight.centre.equals(weight)){
|
if (Weight.centre.equals(weight)){
|
||||||
|
long count = data/10000;
|
||||||
|
for (long i = 0; i < count; i++) {
|
||||||
|
long pageNum = (i - 1) * 10000;
|
||||||
|
submitHighPriorityTask(()->{
|
||||||
|
getString(pageNum, finalFieName, finalJoint,basicId,newBasicId,tableId,map);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Weight.low.equals(weight)){
|
if (Weight.low.equals(weight)){
|
||||||
|
long count = data/10000;
|
||||||
|
for (long i = 0; i < count; i++) {
|
||||||
|
long pageNum = (i - 1) * 10000;
|
||||||
|
submitHighPriorityTask(()->{
|
||||||
|
getString(pageNum, finalFieName, finalJoint,basicId,newBasicId,tableId,map);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Weight.urgency.equals(weight)){
|
if (Weight.urgency.equals(weight)){
|
||||||
|
long count = data/10000;
|
||||||
|
for (long i = 0; i < count; i++) {
|
||||||
|
long pageNum = (i - 1) * 10000;
|
||||||
|
submitHighPriorityTask(()->{
|
||||||
|
getString(pageNum, finalFieName, finalJoint,basicId,newBasicId,tableId,map);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//return getString(fieName,joint,basicId,newBasicId,tableId,map);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private String getString(String fieName,String joint,Long basicId,Long newBasicId,Long tableId,HashMap<String, String> map ) {
|
private void getString(Long pageNum,String fieName,String joint,Long basicId,Long newBasicId,Long tableId,HashMap<String, String> map ) {
|
||||||
|
|
||||||
String sql = " SELECT " + fieName + " FROM " + joint;
|
String sql = " SELECT " + fieName + " FROM " + joint;
|
||||||
System.out.println(sql);
|
System.out.println(sql);
|
||||||
|
@ -268,7 +293,6 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Result result = datasourceFeign.addProduct(newBasicId, tableId, tableValue);
|
Result result = datasourceFeign.addProduct(newBasicId, tableId, tableValue);
|
||||||
return "执行成功";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue