添加联查信息方法

master
陈思豪 2024-09-06 17:20:24 +08:00
parent 0297bf6f59
commit a2c2d9e29e
2 changed files with 7 additions and 2 deletions

View File

@ -194,7 +194,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskInfo> implement
for (int i = 0; i < totalSegments; i++) {
log.info("调用第一次");
log.info("调用第{}次",i);
String limit = " limit "+ i*pageSize + ","+pageSize;
firstArray = count - (long) i *pageSize;
if (firstArray>=pageSize){

View File

@ -13,13 +13,14 @@ import com.muyu.domain.DataValue;
import com.muyu.domain.taskenum.Weight;
import com.muyu.task.feign.DataValueClient;
import lombok.extern.log4j.Log4j2;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashMap;
import java.util.List;
@Log4j2
public class SegmentTask implements Runnable {
public class SegmentTask implements Runnable, Comparable<SegmentTask> {
@Autowired
@ -67,5 +68,9 @@ public class SegmentTask implements Runnable {
}
@Override
public int compareTo(@NotNull SegmentTask o) {
return Integer.compare(o.weight.getWeight(), this.weight.getWeight());
}
}