贴标申请,仓储转运

This commit is contained in:
2026-10-13 10:47:52 +08:00
parent 4c9878c338
commit f7a871e3e4
2 changed files with 21 additions and 8 deletions
@@ -58,6 +58,18 @@ class ReturnOutboundPdaPersistenceTest {
for (Class<?> mapper : List.of(OutboundOrderMapper.class, OutboundPalletItemMapper.class,
OutboundPdaTaskMapper.class, OutboundPdaPickMapper.class, DeliveryOrderMapper.class, ReturnInventoryCartonMapper.class,
ReturnInventoryCartonItemMapper.class, ReturnInventoryBalanceMapper.class, ReturnInventoryMovementMapper.class)) configuration.addMapper(mapper);
// H2 does not implement MySQL charset/collation expressions. Preserve the real
// movement query and bindings, removing only those expressions in this H2 fixture.
for (String method : List.of("platformCount", "platformPage")) {
var statement = configuration.getMappedStatement(ReturnInventoryMovementMapper.class.getName() + "." + method);
var mysqlSource = statement.getSqlSource();
org.apache.ibatis.mapping.SqlSource h2Source = params -> {
var bound = mysqlSource.getBoundSql(params);
String sql = bound.getSql().replaceAll("CONVERT\\(([^()]+) USING utf8mb4\\) COLLATE utf8mb4_unicode_ci", "$1");
return new org.apache.ibatis.mapping.BoundSql(configuration, sql, bound.getParameterMappings(), params);
};
ReflectionTestUtils.setField(statement, "sqlSource", h2Source);
}
var factory = new MybatisSqlSessionFactoryBean(); factory.setDataSource(ds); factory.setConfiguration(configuration);
var session = new SqlSessionTemplate(factory.getObject());
movementMapper = session.getMapper(ReturnInventoryMovementMapper.class);