style(data/mybatis-plus): 移除 ` 符号的使用,保持数据库无关性

This commit is contained in:
2024-02-17 13:32:02 +08:00
parent 2e5788f007
commit 557ea13757
2 changed files with 20 additions and 20 deletions

View File

@@ -112,8 +112,8 @@ public class DataPermissionHandlerImpl implements DataPermissionHandler {
* 构建本部门及以下数据权限表达式 * 构建本部门及以下数据权限表达式
* *
* <p> * <p>
* 处理完后的 SQL 示例:<br /> select t1.* from table as t1 where t1.`dept_id` in (select `id` from `sys_dept` where `id` = * 处理完后的 SQL 示例:<br /> select t1.* from table as t1 where t1.dept_id in (select id from sys_dept where id =
* xxx or find_in_set(xxx, `ancestors`)); * xxx or find_in_set(xxx, ancestors));
* </p> * </p>
* *
* @param dataPermission 数据权限 * @param dataPermission 数据权限
@@ -147,7 +147,7 @@ public class DataPermissionHandlerImpl implements DataPermissionHandler {
* 构建本部门数据权限表达式 * 构建本部门数据权限表达式
* *
* <p> * <p>
* 处理完后的 SQL 示例:<br /> select t1.* from table as t1 where t1.`dept_id` = xxx; * 处理完后的 SQL 示例:<br /> select t1.* from table as t1 where t1.dept_id = xxx;
* </p> * </p>
* *
* @param dataPermission 数据权限 * @param dataPermission 数据权限
@@ -168,7 +168,7 @@ public class DataPermissionHandlerImpl implements DataPermissionHandler {
* 构建仅本人数据权限表达式 * 构建仅本人数据权限表达式
* *
* <p> * <p>
* 处理完后的 SQL 示例:<br /> select t1.* from table as t1 where t1.`create_user` = xxx; * 处理完后的 SQL 示例:<br /> select t1.* from table as t1 where t1.create_user = xxx;
* </p> * </p>
* *
* @param dataPermission 数据权限 * @param dataPermission 数据权限
@@ -190,8 +190,8 @@ public class DataPermissionHandlerImpl implements DataPermissionHandler {
* 构建自定义数据权限表达式 * 构建自定义数据权限表达式
* *
* <p> * <p>
* 处理完后的 SQL 示例:<br /> select t1.* from table as t1 where t1.`dept_id` in (select `dept_id` from `sys_role_dept` * 处理完后的 SQL 示例:<br /> select t1.* from table as t1 where t1.dept_id in (select dept_id from sys_role_dept
* where `role_id` = xxx); * where role_id = xxx);
* </p> * </p>
* *
* @param dataPermission 数据权限 * @param dataPermission 数据权限

View File

@@ -25,72 +25,72 @@ package top.charles7c.continew.starter.data.mybatis.plus.query;
public enum QueryType { public enum QueryType {
/** /**
* 等于 =例如WHERE `age` = 18 * 等于 =例如WHERE age = 18
*/ */
EQ, EQ,
/** /**
* 不等于 !=例如WHERE `age` != 18 * 不等于 !=例如WHERE age != 18
*/ */
NE, NE,
/** /**
* 大于 >例如WHERE `age` > 18 * 大于 >例如WHERE age > 18
*/ */
GT, GT,
/** /**
* 大于等于 >= 例如WHERE `age` >= 18 * 大于等于 >= 例如WHERE age >= 18
*/ */
GE, GE,
/** /**
* 小于 <例如WHERE `age` < 18 * 小于 <例如WHERE age < 18
*/ */
LT, LT,
/** /**
* 小于等于 <=例如WHERE `age` <= 18 * 小于等于 <=例如WHERE age <= 18
*/ */
LE, LE,
/** /**
* 范围查询例如WHERE `age` BETWEEN 10 AND 18 * 范围查询例如WHERE age BETWEEN 10 AND 18
*/ */
BETWEEN, BETWEEN,
/** /**
* LIKE '%值%'例如WHERE `nickname` LIKE '%s%' * LIKE '%值%'例如WHERE nickname LIKE '%s%'
*/ */
LIKE, LIKE,
/** /**
* LIKE '%值'例如WHERE `nickname` LIKE '%s' * LIKE '%值'例如WHERE nickname LIKE '%s'
*/ */
LIKE_LEFT, LIKE_LEFT,
/** /**
* LIKE '值%'例如WHERE `nickname` LIKE 's%' * LIKE '值%'例如WHERE nickname LIKE 's%'
*/ */
LIKE_RIGHT, LIKE_RIGHT,
/** /**
* 包含查询例如WHERE `age` IN (10, 20, 30) * 包含查询例如WHERE age IN (10, 20, 30)
*/ */
IN, IN,
/** /**
* 不包含查询例如WHERE `age` NOT IN (20, 30) * 不包含查询例如WHERE age NOT IN (20, 30)
*/ */
NOT_IN, NOT_IN,
/** /**
* 空查询例如WHERE `email` IS NULL * 空查询例如WHERE email IS NULL
*/ */
IS_NULL, IS_NULL,
/** /**
* 非空查询例如WHERE `email` IS NOT NULL * 非空查询例如WHERE email IS NOT NULL
*/ */
IS_NOT_NULL,; IS_NOT_NULL,;
} }