mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-25 00:15:06 +08:00
by gateway:
1. 补全 channel 单元测试 2. 完善部分 order 单元测试
This commit is contained in:
@ -55,6 +55,9 @@ public class RandomUtils {
|
||||
}
|
||||
return RandomUtil.randomInt();
|
||||
});
|
||||
// LocalDateTime
|
||||
PODAM_FACTORY.getStrategy().addOrReplaceTypeManufacturer(LocalDateTime.class,
|
||||
(dataProviderStrategy, attributeMetadata, map) -> randomLocalDateTime());
|
||||
// Boolean
|
||||
PODAM_FACTORY.getStrategy().addOrReplaceTypeManufacturer(Boolean.class, (dataProviderStrategy, attributeMetadata, map) -> {
|
||||
// 如果是 deleted 的字段,返回非删除
|
||||
@ -82,7 +85,8 @@ public class RandomUtils {
|
||||
}
|
||||
|
||||
public static LocalDateTime randomLocalDateTime() {
|
||||
return LocalDateTimeUtil.of(randomDate());
|
||||
// 设置 Nano 为零的原因,避免 MySQL、H2 存储不到时间戳
|
||||
return LocalDateTimeUtil.of(randomDate()).withNano(0);
|
||||
}
|
||||
|
||||
public static Short randomShort() {
|
||||
|
Reference in New Issue
Block a user