Compare commits

5 Commits

Author SHA1 Message Date
MHW
4a0602ce4e Merge branch 'refs/heads/develop' 2026-03-17 21:22:30 +08:00
MHW
8844830afc 修复lombok导致打包冲突 2026-03-17 21:21:48 +08:00
MHW
bcc450141e 保存场景关系 2026-03-17 11:08:30 +08:00
MHW
25e6ac1cbe Merge branch 'refs/heads/develop' 2026-03-17 11:07:52 +08:00
MHW
8b2f4dab89 保存场景关系 2026-03-17 11:07:35 +08:00
6 changed files with 37 additions and 18 deletions

View File

@@ -113,6 +113,12 @@
<artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.34</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>

View File

@@ -24,10 +24,6 @@
<artifactId>solution-common</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>

View File

@@ -30,10 +30,6 @@
<artifactId>solution-common</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>

View File

@@ -34,7 +34,6 @@ public class SceneServiceImpl implements SceneService {
@Transactional(rollbackFor = Exception.class)
@Override
public int saveOrUpdate(AfsimScenario afsimScenario) {
//TODO 报错待修改
if (null != afsimScenario.getId() && afsimScenario.getId() > 0) {
// 更新场景
int updated = sceneMapper.update(afsimScenario);

View File

@@ -9,12 +9,11 @@
INSERT INTO platform_communication (scenary_id, command_platform, subordinate_platform, command_comm, subordinate_comm)
VALUES
<foreach collection="afsimScenarios" item="item" separator=",">
(#{scenaryId}, #{item.sourcePlatform}, #{item.targetPlatform}, #{item.sourceComponent}, #{item.targetComponent})
</foreach>
</insert>
<delete id="delete" parameterType="java.lang.Integer">
DELETE FROM platform_communication
WHERE scenary_id = #{scenaryId}
</delete>
</mapper>
(#{scenaryId}, #{item.sourcePlatform.name}, #{item.targetPlatform.name}, #{item.sourceComponent.name}, #{item.targetComponent.name})
</foreach>
</insert>
<delete id="delete" parameterType="java.lang.Integer">
DELETE FROM platform_communication
WHERE scenary_id = #{scenaryId}
</delete>
</mapper>

23
pom.xml
View File

@@ -274,6 +274,29 @@
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>11</source>
<target>11</target>
<annotationProcessorPaths>
<!-- 顺序无关,但每个都需要指定版本 -->
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.34</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.5.5.Final</version>
</path>
<!-- 如果有其他 processor 也加在这里 -->
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>