feat: 一些优化
This commit is contained in:
parent
68995b9f43
commit
fdd5589abd
|
|
@ -40,10 +40,60 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<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>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.nflg.mobilebroken.repository.service.impl;
|
package com.nflg.mobilebroken.repository.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
|
@ -173,12 +174,15 @@ public class ProductModelParamsServiceImpl extends ServiceImpl<ProductModelParam
|
||||||
maps.forEach((indexName, data) -> {
|
maps.forEach((indexName, data) -> {
|
||||||
vos.add(new ProductModelMainParamsItemChildrenVO()
|
vos.add(new ProductModelMainParamsItemChildrenVO()
|
||||||
.setIndexName(indexName)
|
.setIndexName(indexName)
|
||||||
|
.setBatchNumber(CollectionUtil.isNotEmpty(data) ? data.get(0).getBatchNumber() : "")
|
||||||
.setItems(data
|
.setItems(data
|
||||||
.stream()
|
.stream()
|
||||||
.map(it -> Convert.convert(ProductParamsItemVO.class, it))
|
.map(it -> Convert.convert(ProductParamsItemVO.class, it))
|
||||||
|
.sorted(Comparator.comparing(ProductParamsItemVO::getBatchNumber))
|
||||||
.collect(Collectors.toList()))
|
.collect(Collectors.toList()))
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
vos.sort(Comparator.comparing(ProductModelMainParamsItemChildrenVO::getBatchNumber));
|
||||||
return vos;
|
return vos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -205,12 +209,15 @@ public class ProductModelParamsServiceImpl extends ServiceImpl<ProductModelParam
|
||||||
maps.forEach((indexName, data) -> {
|
maps.forEach((indexName, data) -> {
|
||||||
vos.add(new ProductModelMainParamsItemChildrenVO()
|
vos.add(new ProductModelMainParamsItemChildrenVO()
|
||||||
.setIndexName(indexName)
|
.setIndexName(indexName)
|
||||||
|
.setBatchNumber(CollectionUtil.isNotEmpty(data) ? data.get(0).getBatchNumber() : "")
|
||||||
.setItems(data
|
.setItems(data
|
||||||
.stream()
|
.stream()
|
||||||
.map(it -> Convert.convert(ProductParamsItemVO.class, it))
|
.map(it -> Convert.convert(ProductParamsItemVO.class, it))
|
||||||
|
.sorted(Comparator.comparing(ProductParamsItemVO::getBatchNumber))
|
||||||
.collect(Collectors.toList()))
|
.collect(Collectors.toList()))
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
vos.sort(Comparator.comparing(ProductModelMainParamsItemChildrenVO::getBatchNumber));
|
||||||
return vos;
|
return vos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue