linwe
2024-06-27 24f2e1047e0260915ce6e401ec36763974531eed
src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcOrderServiceImpl.java
@@ -22,6 +22,7 @@
import org.springblade.modules.police.service.IPoliceAffairsGridService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.math.RoundingMode;
@@ -111,13 +112,16 @@
   }
   @Override
   @Transactional(rollbackFor = Exception.class)
   public boolean SynchronizeData(EcOrderParamDTO ecOrderParamDTO) {
      processPages(100, ecOrderParamDTO);
      return true;
   }
   public void processPages(int pageSize, EcOrderParamDTO ecOrderParamDTO) {
      long count = count(new QueryWrapper<>());
      QueryWrapper<EcOrder> ecOrderQueryWrapper = new QueryWrapper<>();
      ecOrderQueryWrapper.between("import_time", ecOrderParamDTO.getStartTime(), ecOrderParamDTO.getEndTime());
      long count = baseMapper.selectCount(ecOrderQueryWrapper);
      int totalPages = (int) Math.ceil((double) count / pageSize); // 计算总页数
      for (int pageNum = 1; pageNum <= totalPages; pageNum++) {