修改bug

master
Cui YongXing 2024-09-04 22:27:17 +08:00
parent 944b771752
commit f84abf2b70
1 changed files with 15 additions and 14 deletions

View File

@ -274,7 +274,20 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
for (long i = 1; i <= count; i++) {
long pageNum = (i - 1) * 5000;
submitEmergencyTask(()->{
getString(pageNum, finalFieName, finalJoint,basicId,newBasicId,tableId,map);
String sqlSelect = " SELECT " + finalFieName + " FROM " + finalJoint +" limit "+pageNum +",5000 ";
log.info(sqlSelect);
Result<List<List<DataValue>>> tableValueResult = datasourceFeign.findTableValue(basicId, sql);
List<List<DataValue>> tableValue = tableValueResult.getData();
for (List<DataValue> dataValues : tableValue) {
for (DataValue dataValue : dataValues) {
String key = dataValue.getKey();
String newKey = map.get(key);
dataValue.setKey(newKey);
}
}
Result result = datasourceFeign.addProduct(newBasicId, tableId, tableValue);
log.info(result);
//getString(pageNum, finalFieName, finalJoint,basicId,newBasicId,tableId,map);
});
}
}
@ -284,19 +297,7 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
@NotNull
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 +" limit "+pageNum +",5000 ";
log.info(sql);
Result<List<List<DataValue>>> tableValueResult = datasourceFeign.findTableValue(basicId, sql);
List<List<DataValue>> tableValue = tableValueResult.getData();
for (List<DataValue> dataValues : tableValue) {
for (DataValue dataValue : dataValues) {
String key = dataValue.getKey();
String newKey = map.get(key);
dataValue.setKey(newKey);
}
}
Result result = datasourceFeign.addProduct(newBasicId, tableId, tableValue);
log.info(result);
}