fix: align HTTP acceptance fixtures and pallet permissions

This commit is contained in:
2026-09-14 12:40:40 +08:00
parent e55ab73e61
commit a2ea0ba9e6
15 changed files with 205 additions and 50 deletions
@@ -12,6 +12,28 @@ import java.util.Map;
import static org.assertj.core.api.Assertions.assertThat;
class ReturnCartonQueryTest {
@Test
void baseMapperReplayColumnExistsInEveryReturnCartonBaseline() throws Exception {
var table = com.baomidou.mybatisplus.core.metadata.TableInfoHelper.initTableInfo(
new org.apache.ibatis.builder.MapperBuilderAssistant(
new com.baomidou.mybatisplus.core.MybatisConfiguration(), "return-carton-contract"),
com.baiyue.lastleg.returnreceipt.entity.ReturnInventoryCarton.class);
assertThat(table.getAllSqlSelect()).contains("new_carton_mark");
for (var path : java.util.List.of(java.nio.file.Path.of("src/main/resources/db/lastleg.sql"),
java.nio.file.Path.of("../deploy/sql/海外区域统一增量-MySQL8.sql"))) {
String sql = java.nio.file.Files.readString(path);
var matcher = java.util.regex.Pattern.compile(
"CREATE TABLE IF NOT EXISTS ll_return_inventory_carton \\(([\\s\\S]*?)\\) ENGINE")
.matcher(sql);
int definitions = 0;
while (matcher.find()) {
definitions++;
assertThat(matcher.group(1)).as(path.toString()).contains("new_carton_mark VARCHAR(255)");
}
assertThat(definitions).isPositive();
}
}
@Test
void bothQueriesUseExactCustomerScopeAndSkuExistenceWithoutAnOuterJoin() throws Exception {
var query = new ReturnInventoryRequests.Query(2, 1, "42", "SKU", "RC", "AVAILABLE", "RT");