From 562308127865a0ac07fd8776548e89dc1b891c16 Mon Sep 17 00:00:00 2001 From: Looly Date: Fri, 17 Mar 2023 01:31:59 +0800 Subject: [PATCH] fix code --- .../main/java/cn/hutool/db/AbstractDb.java | 21 ++++++++++++++++--- .../cn/hutool/http/client/ClientConfig.java | 4 +++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/hutool-db/src/main/java/cn/hutool/db/AbstractDb.java b/hutool-db/src/main/java/cn/hutool/db/AbstractDb.java index 359bc153e..0143b4dc2 100755 --- a/hutool-db/src/main/java/cn/hutool/db/AbstractDb.java +++ b/hutool-db/src/main/java/cn/hutool/db/AbstractDb.java @@ -51,6 +51,7 @@ public abstract class AbstractDb> extends DefaultConnect } // ------------------------------------------------------- Constructor end + // region ----- query /** * 查询 * @@ -189,7 +190,9 @@ public abstract class AbstractDb> extends DefaultConnect this.closeConnection(conn); } } + // endregion + // region ----- execute /** * 执行非查询语句
* 语句包括 插入、更新、删除 @@ -282,9 +285,11 @@ public abstract class AbstractDb> extends DefaultConnect this.closeConnection(conn); } } + // endregion // ---------------------------------------------------------------------------- CRUD start + // region ----- insert /** * 插入数据 * @@ -395,7 +400,9 @@ public abstract class AbstractDb> extends DefaultConnect this.closeConnection(conn); } } + // endregion + // region ----- del /** * 删除数据 * @@ -425,7 +432,9 @@ public abstract class AbstractDb> extends DefaultConnect this.closeConnection(conn); } } + // endregion + // region ----- update /** * 更新数据
* 更新条件为多个key value对表示,默认key = value,如果使用其它条件可以使用:where.put("key", " > 1"),value也可以传Condition对象,key被忽略 @@ -444,8 +453,9 @@ public abstract class AbstractDb> extends DefaultConnect this.closeConnection(conn); } } + // endregion - // ------------------------------------------------------------- Get start + // region ----- get /** * 根据某个字段(最好是唯一字段)查询单个记录
@@ -473,8 +483,9 @@ public abstract class AbstractDb> extends DefaultConnect return find(where.getFieldNames(), where, new EntityHandler(this.caseInsensitive)); } - // ------------------------------------------------------------- Get end + // endregion + // region ----- find /** * 查询
* 查询条件为多个key value对表示,默认key = value,如果使用其它条件可以使用:where.put("key", " > 1"),value也可以传Condition对象,key被忽略 @@ -652,7 +663,9 @@ public abstract class AbstractDb> extends DefaultConnect public List findLike(final String tableName, final String field, final String value, final LikeType likeType) throws DbRuntimeException { return findAll(Entity.of(tableName).set(field, SqlUtil.buildLikeValue(value, likeType, true))); } + // endregion + // region ----- count /** * 结果的条目数 * @@ -705,7 +718,9 @@ public abstract class AbstractDb> extends DefaultConnect this.closeConnection(conn); } } + // endregion + // region ----- page /** * 分页查询,结果为Entity列表,不计算总数
* 查询条件为多个key value对表示,默认key = value,如果使用其它条件可以使用:where.put("key", " > 1"),value也可以传Condition对象,key被忽略 @@ -867,7 +882,7 @@ public abstract class AbstractDb> extends DefaultConnect public PageResult page(final Entity where, final Page page) throws DbRuntimeException { return this.page(where.getFieldNames(), where, page); } - // ---------------------------------------------------------------------------- CRUD end + // endregion // ---------------------------------------------------------------------------- Getters and Setters start diff --git a/hutool-http/src/main/java/cn/hutool/http/client/ClientConfig.java b/hutool-http/src/main/java/cn/hutool/http/client/ClientConfig.java index 2e1fcde6c..b4b412809 100755 --- a/hutool-http/src/main/java/cn/hutool/http/client/ClientConfig.java +++ b/hutool-http/src/main/java/cn/hutool/http/client/ClientConfig.java @@ -30,7 +30,9 @@ public class ClientConfig { * 默认读取超时 */ private int readTimeout; - + /** + * SSL相关配置 + */ private SSLInfo sslInfo; /** * 是否禁用缓存