From 7ca4279e0440a7d68dadd82b5cf5b9dffb5c883c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=B6=85?= <920806536@qq.com> Date: Thu, 12 Oct 2023 08:14:46 +0000 Subject: [PATCH 1/7] update docs/zh/base/parts/base-mapper-query-methods.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王超 <920806536@qq.com> --- docs/zh/base/parts/base-mapper-query-methods.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/zh/base/parts/base-mapper-query-methods.md b/docs/zh/base/parts/base-mapper-query-methods.md index 0aae2ae6..b8a9c0ef 100644 --- a/docs/zh/base/parts/base-mapper-query-methods.md +++ b/docs/zh/base/parts/base-mapper-query-methods.md @@ -1,4 +1,5 @@ - **`selectOneById(id)`**:根据主键查询数据。 +- **`selectOneByEntityId(entity)`**:根据实体主键查询数据。 - **`selectOneByMap(whereConditions)`**:根据 Map 构建的条件来查询数据。 - **`selectOneByCondition(whereConditions)`**:根据查询条件查询数据。 - **`selectOneByQuery(queryWrapper)`**:根据查询条件来查询 1 条数据。 From 8b532e18df8c41339b6afbea3c9a3cbfe8c1fbe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=B6=85?= <920806536@qq.com> Date: Thu, 12 Oct 2023 08:22:33 +0000 Subject: [PATCH 2/7] update docs/zh/base/parts/base-mapper-delete-methods.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王超 <920806536@qq.com> --- docs/zh/base/parts/base-mapper-delete-methods.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/zh/base/parts/base-mapper-delete-methods.md b/docs/zh/base/parts/base-mapper-delete-methods.md index 73c2139f..414b8fff 100644 --- a/docs/zh/base/parts/base-mapper-delete-methods.md +++ b/docs/zh/base/parts/base-mapper-delete-methods.md @@ -1,4 +1,5 @@ - **`deleteById(id)`**:根据主键删除数据。如果是多个主键的情况下,需要传入数组,例如:`new Integer[]{100,101}`。 +- **`delete(entity)`**:根据实体主键来删除数据。相比deleteById(id),此方法更便于对多主键实体类的删除。 - **`deleteBatchByIds(ids)`**:根据多个主键批量删除数据。 - **`deleteBatchByIds(ids, size)`**:根据多个主键批量删除数据。 - **`deleteByMap(whereConditions)`**:根据 Map 构建的条件来删除数据。 From f30f28454fa880eb255ffcf4506ca06c266b153d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=B6=85?= <920806536@qq.com> Date: Thu, 12 Oct 2023 08:30:09 +0000 Subject: [PATCH 3/7] update docs/zh/base/service.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王超 <920806536@qq.com> --- docs/zh/base/service.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/zh/base/service.md b/docs/zh/base/service.md index a94095e6..a507237d 100644 --- a/docs/zh/base/service.md +++ b/docs/zh/base/service.md @@ -49,6 +49,7 @@ public class AccountServiceImpl extends ServiceImpl - **remove(query)**:根据 `QueryWrapper` 构建的条件来删除数据。 - **remove(condition)**:根据 `QueryCondition` 构建的条件来删除数据。 - **removeById(id)**:根据主键删除数据,复合主键需要传入一个数组。 +- **removeById(entity)**:根据实体主键删除数据,相比removeById(id),此方法更便于对多主键实体类的删除。。 - **removeByIds(ids)**:根据主键的集合,批量删除多条数据。 - **removeByMap(map)**:根据 `Map<字段名,值>` 组成的条件删除数据,字段名和值的关系为相等的关系;同时,防止 "不小心" 全表删除数据,Map 的值不允许为 null 或者空数据。 @@ -74,6 +75,8 @@ public class AccountServiceImpl extends ServiceImpl - **getById(id)**:根据主键查询数据。 - **getByIdOpt(id)**:根据主键查询数据,并封装为 `Optional` 返回。 +- **getOneByEntityId(entity)**:根据实体主键查询数据。 +- **getByEntityIdOpt(entity)**:根据实体主键查询数据,并封装为 `Optional` 返回。 - **getOne(query)**: 根据 `QueryWrapper` 构建的条件查询一条数据。 - **getOne(condition)**: 根据 `QueryCondition` 构建的条件查询一条数据。 - **getOneOpt(query)**: 根据`QueryWrapper` 构建的条件查询一条数据,并封装为 `Optional` 返回。 From 2571721b205bb48546e2d782662f7180e0666614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=B6=85?= <920806536@qq.com> Date: Thu, 12 Oct 2023 08:31:27 +0000 Subject: [PATCH 4/7] update docs/zh/base/parts/base-mapper-query-methods.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王超 <920806536@qq.com> --- docs/zh/base/parts/base-mapper-query-methods.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/base/parts/base-mapper-query-methods.md b/docs/zh/base/parts/base-mapper-query-methods.md index b8a9c0ef..8f0b8c9b 100644 --- a/docs/zh/base/parts/base-mapper-query-methods.md +++ b/docs/zh/base/parts/base-mapper-query-methods.md @@ -1,5 +1,5 @@ - **`selectOneById(id)`**:根据主键查询数据。 -- **`selectOneByEntityId(entity)`**:根据实体主键查询数据。 +- **`selectOneByEntityId(entity)`**:根据实体主键查询数据,便于对多主键实体类的查询。 - **`selectOneByMap(whereConditions)`**:根据 Map 构建的条件来查询数据。 - **`selectOneByCondition(whereConditions)`**:根据查询条件查询数据。 - **`selectOneByQuery(queryWrapper)`**:根据查询条件来查询 1 条数据。 From 0d2226683775c553cd65b1d9c6b8cf2b527df835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=B6=85?= <920806536@qq.com> Date: Thu, 12 Oct 2023 08:34:26 +0000 Subject: [PATCH 5/7] update docs/zh/base/parts/base-mapper-query-methods.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王超 <920806536@qq.com> --- docs/zh/base/parts/base-mapper-query-methods.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/base/parts/base-mapper-query-methods.md b/docs/zh/base/parts/base-mapper-query-methods.md index 8f0b8c9b..b43994cf 100644 --- a/docs/zh/base/parts/base-mapper-query-methods.md +++ b/docs/zh/base/parts/base-mapper-query-methods.md @@ -1,5 +1,5 @@ - **`selectOneById(id)`**:根据主键查询数据。 -- **`selectOneByEntityId(entity)`**:根据实体主键查询数据,便于对多主键实体类的查询。 +- **`selectOneByEntityId(entity)`**:根据实体主键查询数据,便于对复合主键实体类的查询。 - **`selectOneByMap(whereConditions)`**:根据 Map 构建的条件来查询数据。 - **`selectOneByCondition(whereConditions)`**:根据查询条件查询数据。 - **`selectOneByQuery(queryWrapper)`**:根据查询条件来查询 1 条数据。 From 325e47eadb212108207a974156d12327a1259b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=B6=85?= <920806536@qq.com> Date: Thu, 12 Oct 2023 08:34:53 +0000 Subject: [PATCH 6/7] update docs/zh/base/parts/base-mapper-delete-methods.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王超 <920806536@qq.com> --- docs/zh/base/parts/base-mapper-delete-methods.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/base/parts/base-mapper-delete-methods.md b/docs/zh/base/parts/base-mapper-delete-methods.md index 414b8fff..fd337404 100644 --- a/docs/zh/base/parts/base-mapper-delete-methods.md +++ b/docs/zh/base/parts/base-mapper-delete-methods.md @@ -1,5 +1,5 @@ - **`deleteById(id)`**:根据主键删除数据。如果是多个主键的情况下,需要传入数组,例如:`new Integer[]{100,101}`。 -- **`delete(entity)`**:根据实体主键来删除数据。相比deleteById(id),此方法更便于对多主键实体类的删除。 +- **`delete(entity)`**:根据实体主键来删除数据。相比deleteById(id),此方法更便于对复合主键实体类的删除。 - **`deleteBatchByIds(ids)`**:根据多个主键批量删除数据。 - **`deleteBatchByIds(ids, size)`**:根据多个主键批量删除数据。 - **`deleteByMap(whereConditions)`**:根据 Map 构建的条件来删除数据。 From 30e9367334fb199978fed614d6fc97498cfa4e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=B6=85?= <920806536@qq.com> Date: Thu, 12 Oct 2023 08:35:28 +0000 Subject: [PATCH 7/7] update docs/zh/base/service.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王超 <920806536@qq.com> --- docs/zh/base/service.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/base/service.md b/docs/zh/base/service.md index a507237d..91bb75f0 100644 --- a/docs/zh/base/service.md +++ b/docs/zh/base/service.md @@ -49,7 +49,7 @@ public class AccountServiceImpl extends ServiceImpl - **remove(query)**:根据 `QueryWrapper` 构建的条件来删除数据。 - **remove(condition)**:根据 `QueryCondition` 构建的条件来删除数据。 - **removeById(id)**:根据主键删除数据,复合主键需要传入一个数组。 -- **removeById(entity)**:根据实体主键删除数据,相比removeById(id),此方法更便于对多主键实体类的删除。。 +- **removeById(entity)**:根据实体主键删除数据,相比removeById(id),此方法更便于对复合主键实体类的删除。。 - **removeByIds(ids)**:根据主键的集合,批量删除多条数据。 - **removeByMap(map)**:根据 `Map<字段名,值>` 组成的条件删除数据,字段名和值的关系为相等的关系;同时,防止 "不小心" 全表删除数据,Map 的值不允许为 null 或者空数据。