refactor: flatten dto entity and mapper packages

This commit is contained in:
wh
2026-04-14 13:39:24 +08:00
parent 3e33398dd2
commit 0dbb88b803
50 changed files with 137 additions and 104 deletions

View File

@@ -2,7 +2,7 @@ package com.label.integration;
import com.label.AbstractIntegrationTest;
import com.label.common.result.Result;
import com.label.module.user.dto.LoginRequest;
import com.label.dto.LoginRequest;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;

View File

@@ -1,7 +1,7 @@
package com.label.integration;
import com.label.AbstractIntegrationTest;
import com.label.module.user.dto.LoginRequest;
import com.label.dto.LoginRequest;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

View File

@@ -1,7 +1,7 @@
package com.label.integration;
import com.label.AbstractIntegrationTest;
import com.label.module.user.dto.LoginRequest;
import com.label.dto.LoginRequest;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

View File

@@ -1,7 +1,7 @@
package com.label.integration;
import com.label.AbstractIntegrationTest;
import com.label.module.user.dto.LoginRequest;
import com.label.dto.LoginRequest;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

View File

@@ -5,14 +5,14 @@ import com.label.module.annotation.controller.QaController;
import com.label.module.config.controller.SysConfigController;
import com.label.module.export.controller.ExportController;
import com.label.module.source.controller.SourceController;
import com.label.module.source.dto.SourceResponse;
import com.label.dto.SourceResponse;
import com.label.module.task.controller.TaskController;
import com.label.module.task.dto.TaskResponse;
import com.label.dto.TaskResponse;
import com.label.module.user.controller.AuthController;
import com.label.module.user.controller.UserController;
import com.label.module.user.dto.LoginRequest;
import com.label.module.user.dto.LoginResponse;
import com.label.module.user.dto.UserInfoResponse;
import com.label.dto.LoginRequest;
import com.label.dto.LoginResponse;
import com.label.dto.UserInfoResponse;
import com.label.module.video.controller.VideoController;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema;

View File

@@ -29,6 +29,39 @@ class PackageStructureMigrationTest {
assertClassMissing("com.label.module.annotation.service.ExtractionApprovedEventListener");
}
@Test
@DisplayName("DTO、实体、Mapper 已迁移到扁平数据层")
void dataTypesMoved() {
for (String fqcn : java.util.List.of(
"com.label.dto.LoginRequest",
"com.label.dto.LoginResponse",
"com.label.dto.UserInfoResponse",
"com.label.dto.TaskResponse",
"com.label.dto.SourceResponse",
"com.label.entity.AnnotationResult",
"com.label.entity.TrainingDataset",
"com.label.entity.SysConfig",
"com.label.entity.ExportBatch",
"com.label.entity.SourceData",
"com.label.entity.AnnotationTask",
"com.label.entity.AnnotationTaskHistory",
"com.label.entity.SysCompany",
"com.label.entity.SysUser",
"com.label.entity.VideoProcessJob",
"com.label.mapper.AnnotationResultMapper",
"com.label.mapper.TrainingDatasetMapper",
"com.label.mapper.SysConfigMapper",
"com.label.mapper.ExportBatchMapper",
"com.label.mapper.SourceDataMapper",
"com.label.mapper.AnnotationTaskMapper",
"com.label.mapper.TaskHistoryMapper",
"com.label.mapper.SysCompanyMapper",
"com.label.mapper.SysUserMapper",
"com.label.mapper.VideoProcessJobMapper")) {
assertClassExists(fqcn);
}
}
private static void assertClassExists(String fqcn) {
assertThatCode(() -> Class.forName(fqcn)).doesNotThrowAnyException();
}