fix(firstleg): map PDA query rows to concrete beans

This commit is contained in:
2026-08-12 10:37:50 +08:00
parent b90470af97
commit 91c6ebca5c
3 changed files with 67 additions and 19 deletions
@@ -5,9 +5,21 @@ import com.baiyue.firstleg.mapper.LoadingPickTaskMapper;
import org.apache.ibatis.annotations.Select;
import org.junit.jupiter.api.Test;
import java.lang.reflect.Modifier;
import static org.assertj.core.api.Assertions.assertThat;
class LoadingPickPdaTaskSqlContractTest {
@Test
void queryRowsAreConcreteBeansThatMyBatisCanInstantiate() throws Exception {
assertThat(LoadingPickTaskMapper.PendingTaskRow.class.isInterface()).isFalse();
assertThat(LoadingPickItemMapper.CartonLabelRow.class.isInterface()).isFalse();
assertThat(Modifier.isPublic(LoadingPickTaskMapper.PendingTaskRow.class.getConstructor().getModifiers()))
.isTrue();
assertThat(Modifier.isPublic(LoadingPickItemMapper.CartonLabelRow.class.getConstructor().getModifiers()))
.isTrue();
}
@Test
void pendingTasksAreLimitedToUnassignedOrCurrentOperatorWithoutCustomerInput() throws Exception {
String sql = LoadingPickTaskMapper.class