mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
优化
This commit is contained in:
@@ -761,7 +761,17 @@ public class CommonQuery {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
return orders.stream().map(x -> new Sort.Order(x.direction, x.property)).toList();
|
||||
return orders.stream()
|
||||
.map(
|
||||
x ->
|
||||
new Sort.Order(x.direction, x.property)
|
||||
.with(
|
||||
Sort.NullHandling.valueOf(
|
||||
StringUtils.defaultIfBlank(
|
||||
x.nullHandling,
|
||||
Sort.NullHandling.NULLS_LAST
|
||||
.name()))))
|
||||
.toList();
|
||||
}
|
||||
|
||||
public Specification specification(ConversionService conversionService) {
|
||||
@@ -1111,6 +1121,7 @@ public class CommonQuery {
|
||||
|
||||
private final Sort.Direction direction;
|
||||
private final String property;
|
||||
private final String nullHandling;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
||||
@@ -3,6 +3,7 @@ package cn.lihongjie.coal.weightDeviceData.entity;
|
||||
import cn.lihongjie.coal.base.entity.OrgCommonEntity;
|
||||
import cn.lihongjie.coal.weightDevice.entity.WeightDeviceEntity;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.FetchType;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
@@ -460,4 +461,10 @@ public class WeightDeviceDataEntity extends OrgCommonEntity {
|
||||
private String archiveStatus = "0";
|
||||
|
||||
|
||||
@Comment("最小时间, 用于排序")
|
||||
@Column(insertable = false, updatable = false, columnDefinition = " timestamp(6) generated always as ( least(mz_time, pz_time, ycgbtime, ecgb_time) ) stored ")
|
||||
|
||||
private LocalDateTime minTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user