diff --git a/src/main/java/com/chint/domain/service/order_record/LYOrderRecordDomainService.java b/src/main/java/com/chint/domain/service/order_record/LYOrderRecordDomainService.java index a6fd19a9..aa0f18f1 100644 --- a/src/main/java/com/chint/domain/service/order_record/LYOrderRecordDomainService.java +++ b/src/main/java/com/chint/domain/service/order_record/LYOrderRecordDomainService.java @@ -88,7 +88,7 @@ public class LYOrderRecordDomainService { .map(it -> lyOrderRecordExtensionFactory.createFlightOrderRecord(it, collect.get(it.getOutApplayOrderNo()))) .toList(); orderDetailDomainService.saveFlightOrderRecordBatch(orderFlightRecordList); - jdbcLyOrderFlightRecord.updateStatusByNullStatus(); + jdbcLyOrderFlightRecord.updateStatusByIds(orderFlightRecordList.stream().map(OrderFlightRecord::getId).toList()); count++; } while (count < LoopNum); //修改数据,将状态为null的设置为1 @@ -121,7 +121,7 @@ public class LYOrderRecordDomainService { .map(it -> lyOrderRecordExtensionFactory.createHotelOrderRecord(it, collect.get(it.getOutApplayOrderNo()))) .toList(); orderDetailDomainService.saveHotelOrderRecordBatch(orderHotelRecordList); - jdbcLyOrderHotelRecord.updateStatusByNullStatus(); + jdbcLyOrderHotelRecord.updateStatusByIds(orderHotelRecordList.stream().map(OrderHotelRecord::getId).toList()); count++; } while (count < LoopNum); //修改数据,将状态为null的设置为1 @@ -153,7 +153,7 @@ public class LYOrderRecordDomainService { .map(it -> lyOrderRecordExtensionFactory.createTrainOrderRecord(it, collect.get(it.getOutApplayOrderNo()))) .toList(); orderDetailDomainService.saveTrainOrderRecordBatch(orderTrainRecordList); - jdbcLyOrderTrainRecord.updateStatusByNullStatus(); + jdbcLyOrderTrainRecord.updateStatusByIds(orderTrainRecordList.stream().map(OrderTrainRecord::getId).toList()); count++; } while (count < LoopNum); //修改数据,将状态为null的设置为1 @@ -187,7 +187,7 @@ public class LYOrderRecordDomainService { .map(it -> lyOrderRecordExtensionFactory.createCarOrderRecord(it, collect.get(it.getOutApplayOrderNo()))) .toList(); orderDetailDomainService.saveCarOrderRecordBatch(orderCarRecordList); - jdbcLyOrderCarRecord.updateStatusByNullStatus(); + jdbcLyOrderCarRecord.updateStatusByIds(orderCarRecordList.stream().map(OrderCarRecord::getId).toList()); count++; } while (count < LoopNum); //修改数据,将状态为null的设置为1 diff --git a/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderCarRecord.java b/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderCarRecord.java index b4f165c0..9b270e89 100644 --- a/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderCarRecord.java +++ b/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderCarRecord.java @@ -23,4 +23,8 @@ public interface JdbcLyOrderCarRecord extends CrudRepository ids); } diff --git a/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderFlightRecord.java b/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderFlightRecord.java index 450728a5..bf468bb7 100644 --- a/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderFlightRecord.java +++ b/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderFlightRecord.java @@ -23,4 +23,8 @@ public interface JdbcLyOrderFlightRecord extends CrudRepository ids); } diff --git a/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderHotelRecord.java b/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderHotelRecord.java index 1b5fbf1b..37099670 100644 --- a/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderHotelRecord.java +++ b/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderHotelRecord.java @@ -24,4 +24,8 @@ public interface JdbcLyOrderHotelRecord extends CrudRepository ids); } diff --git a/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderTrainRecord.java b/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderTrainRecord.java index ff720591..a2c16c53 100644 --- a/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderTrainRecord.java +++ b/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcLyOrderTrainRecord.java @@ -23,4 +23,8 @@ public interface JdbcLyOrderTrainRecord extends CrudRepository ids); } diff --git a/src/test/java/com/chint/ExcelTest.java b/src/test/java/com/chint/ExcelTest.java index 2dbe04d1..2d0dd0ab 100644 --- a/src/test/java/com/chint/ExcelTest.java +++ b/src/test/java/com/chint/ExcelTest.java @@ -59,6 +59,7 @@ import com.chint.interfaces.rest.ly.reconciliation.request.ReqStatement; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.ApplicationContext; @@ -97,6 +98,16 @@ public class ExcelTest { @Autowired private JdbcSystemLogRepository jdbcSystemLogRepository; + @Test + public void excelTest() { + List ids=new ArrayList<>(); + ids.add(1L); + ids.add(2L); + jdbcLyOrderFlightRecord.updateStatusByIds(ids); + jdbcLyOrderHotelRecord.updateStatusByIds(ids); + jdbcLyOrderTrainRecord.updateStatusByIds(ids); + jdbcLyOrderCarRecord.updateStatusByIds(ids); + } // @Test // 集团员工数据导入