feat: 新需求功能代码提交。

This commit is contained in:
tianyongbao
2025-10-15 14:14:22 +08:00
parent 1e5013a1eb
commit f54859f62d
27 changed files with 2399 additions and 32 deletions

View File

@@ -0,0 +1,28 @@
package org.dromara.common.json.handler;
import java.io.IOException;
import java.text.DecimalFormat;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
/**
* Double 类型格式化序列化器
* 保留两位小数
*
* @author intc
*/
public class DoubleSerializer extends JsonSerializer<Double> {
private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("0.00");
@Override
public void serialize(Double value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
if (value == null) {
gen.writeNull();
} else {
gen.writeNumber(DECIMAL_FORMAT.format(value));
}
}
}

View File

@@ -41,7 +41,6 @@
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-jsqlparser</artifactId>
</dependency>
<!-- sql性能分析插件 -->
<dependency>
<groupId>p6spy</groupId>