PC端添加本地打印机

This commit is contained in:
2024-04-02 14:42:41 +08:00
parent 8fe9d11d99
commit 0e7ee8d230
8 changed files with 785 additions and 0 deletions

View File

@@ -69,6 +69,17 @@ public class JSONUtil {
return toJSONString0(obj, "yyyy-MM-dd HH:mm:ss", false, true, false);
}
/**
* 将对象转为JSON字符串。
* 日期转为特别的格式不忽略null值的字段不格式化JSON字符串
*
* @param obj 被转换的对象
* @return JSON字符串发送异常时抛出
*/
public static String toJSONString(Object obj,boolean ignoreNull) {
return toJSONString0(obj, "yyyy-MM-dd HH:mm:ss", ignoreNull, true, false);
}
/**
* 将对象转为JSON字符串。不抛出异常专用于日志打印
*