【fix】修改为更改根据id修改记录状态
This commit is contained in:
parent
8a5eb3c098
commit
d3dddf87af
|
@ -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
|
||||
|
|
|
@ -23,4 +23,8 @@ public interface JdbcLyOrderCarRecord extends CrudRepository<LyOrderCarRecord, L
|
|||
@Modifying
|
||||
@Query("UPDATE ly_order_car_record l SET l.status = 1 WHERE l.status IS NULL")
|
||||
void updateStatusByNullStatus();
|
||||
|
||||
@Modifying
|
||||
@Query("UPDATE ly_order_car_record SET status = 1 WHERE id IN (:#{#ids})")
|
||||
void updateStatusByIds(@Param("ids") List<Long> ids);
|
||||
}
|
||||
|
|
|
@ -23,4 +23,8 @@ public interface JdbcLyOrderFlightRecord extends CrudRepository<LyOrderFlightRec
|
|||
@Modifying
|
||||
@Query("UPDATE ly_order_flight_record l SET l.status = 1 WHERE l.status IS NULL")
|
||||
void updateStatusByNullStatus();
|
||||
|
||||
@Modifying
|
||||
@Query("UPDATE ly_order_flight_record SET status = 1 WHERE id IN (:#{#ids})")
|
||||
void updateStatusByIds(@Param("ids") List<Long> ids);
|
||||
}
|
||||
|
|
|
@ -24,4 +24,8 @@ public interface JdbcLyOrderHotelRecord extends CrudRepository<LyOrderHotelRecor
|
|||
@Modifying
|
||||
@Query("UPDATE ly_order_hotel_record l SET l.status = 1 WHERE l.status IS NULL")
|
||||
void updateStatusByNullStatus();
|
||||
|
||||
@Modifying
|
||||
@Query("UPDATE ly_order_hotel_record SET status = 1 WHERE id IN (:#{#ids})")
|
||||
void updateStatusByIds(@Param("ids") List<Long> ids);
|
||||
}
|
||||
|
|
|
@ -23,4 +23,8 @@ public interface JdbcLyOrderTrainRecord extends CrudRepository<LyOrderTrainRecor
|
|||
@Modifying
|
||||
@Query("UPDATE ly_order_train_record l SET l.status = 1 WHERE l.status IS NULL")
|
||||
void updateStatusByNullStatus();
|
||||
|
||||
@Modifying
|
||||
@Query("UPDATE ly_order_train_record SET status = 1 WHERE id IN (:#{#ids})")
|
||||
void updateStatusByIds(@Param("ids") List<Long> ids);
|
||||
}
|
||||
|
|
|
@ -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<Long> ids=new ArrayList<>();
|
||||
ids.add(1L);
|
||||
ids.add(2L);
|
||||
jdbcLyOrderFlightRecord.updateStatusByIds(ids);
|
||||
jdbcLyOrderHotelRecord.updateStatusByIds(ids);
|
||||
jdbcLyOrderTrainRecord.updateStatusByIds(ids);
|
||||
jdbcLyOrderCarRecord.updateStatusByIds(ids);
|
||||
}
|
||||
|
||||
// @Test
|
||||
// 集团员工数据导入
|
||||
|
|
Loading…
Reference in New Issue