主要改进: - 新增OrderCreationRequest及相关DTO类,使用Builder模式提升代码可读性 - 引入类型安全的枚举类OrderConstant,替代魔法字符串常量 - 重构PlayOrderInfoServiceImpl,新增基于Builder模式的createOrderInfo方法 - 保留原有方法并标记为@Deprecated,确保向后兼容性 - 完善单元测试覆盖,包含Mockito模拟和边界条件测试 - 优化包结构,将DTO类从vo包迁移到dto包 - 添加JUnit 5和Mockito测试依赖 - 移除实体类过度使用的Lombok注解,改用精简的自定义构造器 - 新增数据库开发工作流程文档 技术栈: - Spring Boot 2.7.9 - MyBatis-Plus 3.5.3.2 - JUnit 5 + Mockito - Lombok Builder模式 - 类型安全枚举设计
194 lines
6.4 KiB
XML
194 lines
6.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<parent>
|
|
<groupId>com.starry</groupId>
|
|
<artifactId>play-with</artifactId>
|
|
<version>1.1</version>
|
|
</parent>
|
|
|
|
<artifactId>play-admin</artifactId>
|
|
|
|
<properties>
|
|
<java.version>11</java.version>
|
|
<maven.compiler.source>11</maven.compiler.source>
|
|
<maven.compiler.target>11</maven.compiler.target>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<!--引入springboot-->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
</dependency>
|
|
<!-- Flyway -->
|
|
<dependency>
|
|
<groupId>org.flywaydb</groupId>
|
|
<artifactId>flyway-core</artifactId>
|
|
</dependency>
|
|
<!--通用模块-->
|
|
<dependency>
|
|
<groupId>com.starry</groupId>
|
|
<artifactId>play-common</artifactId>
|
|
<version>1.1</version>
|
|
</dependency>
|
|
<!--代码生成模块-->
|
|
<dependency>
|
|
<groupId>com.starry</groupId>
|
|
<artifactId>play-generator</artifactId>
|
|
</dependency>
|
|
|
|
|
|
<!--JWT(Json Web Token)登录支持-->
|
|
<dependency>
|
|
<groupId>io.jsonwebtoken</groupId>
|
|
<artifactId>jjwt</artifactId>
|
|
</dependency>
|
|
<!--mysql-->
|
|
<dependency>
|
|
<groupId>mysql</groupId>
|
|
<artifactId>mysql-connector-java</artifactId>
|
|
<version>8.0.26</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.github.yulichang</groupId>
|
|
<artifactId>mybatis-plus-join-boot-starter</artifactId>
|
|
</dependency>
|
|
<!-- easyexcel -->
|
|
<dependency>
|
|
<groupId>com.alibaba</groupId>
|
|
<artifactId>easyexcel</artifactId>
|
|
</dependency>
|
|
<!-- SpringBoot AOP 拦截器 -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-aop</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-data-redis</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.aliyun.oss</groupId>
|
|
<artifactId>aliyun-sdk-oss</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.github.binarywang</groupId>
|
|
<artifactId>wx-java-mp-spring-boot-starter</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.github.wxpay</groupId>
|
|
<artifactId>wxpay-sdk</artifactId>
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
<groupId>ws.schild</groupId>
|
|
<artifactId>jave-core</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.github.binarywang</groupId>
|
|
<artifactId>weixin-java-pay</artifactId>
|
|
<version>4.5.0</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.squareup.okio</groupId>
|
|
<artifactId>okio</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.tencentcloudapi</groupId>
|
|
<artifactId>tencentcloud-sdk-java-dnspod</artifactId>
|
|
<version>3.1.322</version>
|
|
<exclusions>
|
|
<exclusion>
|
|
<artifactId>okio</artifactId>
|
|
<groupId>com.squareup.okio</groupId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
|
|
<!--Lombok-->
|
|
<dependency>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<!-- Add lombok annotation processor -->
|
|
<dependency>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok-mapstruct-binding</artifactId>
|
|
<version>0.2.0</version>
|
|
</dependency>
|
|
|
|
<!--JUnit 5 for testing-->
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.mockito</groupId>
|
|
<artifactId>mockito-core</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.mockito</groupId>
|
|
<artifactId>mockito-junit-jupiter</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
<build>
|
|
<defaultGoal>ruoyi-admin-mrwho</defaultGoal>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<annotationProcessorPaths>
|
|
<path>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<version>1.18.30</version>
|
|
</path>
|
|
</annotationProcessorPaths>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.flywaydb</groupId>
|
|
<artifactId>flyway-maven-plugin</artifactId>
|
|
<version>7.15.0</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>3.0.0-M7</version>
|
|
<configuration>
|
|
<useSystemClassLoader>false</useSystemClassLoader>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<version>2.7.9</version>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>repackage</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project> |