| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | @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++) { |