feat: 一些优化

This commit is contained in:
曹鹏飞 2025-07-10 18:09:04 +08:00
parent 68995b9f43
commit fdd5589abd
2 changed files with 58 additions and 1 deletions

View File

@ -40,10 +40,60 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<excludeGroupIds>${project.groupId}</excludeGroupIds>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.nflg.mobilebroken.push.PushApplication</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>${project.groupId}:*</include>
</includes>
</artifactSet>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -1,5 +1,6 @@
package com.nflg.mobilebroken.repository.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -173,12 +174,15 @@ public class ProductModelParamsServiceImpl extends ServiceImpl<ProductModelParam
maps.forEach((indexName, data) -> {
vos.add(new ProductModelMainParamsItemChildrenVO()
.setIndexName(indexName)
.setBatchNumber(CollectionUtil.isNotEmpty(data) ? data.get(0).getBatchNumber() : "")
.setItems(data
.stream()
.map(it -> Convert.convert(ProductParamsItemVO.class, it))
.sorted(Comparator.comparing(ProductParamsItemVO::getBatchNumber))
.collect(Collectors.toList()))
);
});
vos.sort(Comparator.comparing(ProductModelMainParamsItemChildrenVO::getBatchNumber));
return vos;
}
@ -205,12 +209,15 @@ public class ProductModelParamsServiceImpl extends ServiceImpl<ProductModelParam
maps.forEach((indexName, data) -> {
vos.add(new ProductModelMainParamsItemChildrenVO()
.setIndexName(indexName)
.setBatchNumber(CollectionUtil.isNotEmpty(data) ? data.get(0).getBatchNumber() : "")
.setItems(data
.stream()
.map(it -> Convert.convert(ProductParamsItemVO.class, it))
.sorted(Comparator.comparing(ProductParamsItemVO::getBatchNumber))
.collect(Collectors.toList()))
);
});
vos.sort(Comparator.comparing(ProductModelMainParamsItemChildrenVO::getBatchNumber));
return vos;
}