mirror of
				https://github.com/continew-org/continew-starter.git
				synced 2025-10-31 22:57:19 +08:00 
			
		
		
		
	style(data/mybatis-plus): 移除 ` 符号的使用,保持数据库无关性
This commit is contained in:
		| @@ -112,8 +112,8 @@ public class DataPermissionHandlerImpl implements DataPermissionHandler { | ||||
|      * 构建本部门及以下数据权限表达式 | ||||
|      * | ||||
|      * <p> | ||||
|      * 处理完后的 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`)); | ||||
|      * 处理完后的 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)); | ||||
|      * </p> | ||||
|      * | ||||
|      * @param dataPermission 数据权限 | ||||
| @@ -147,7 +147,7 @@ public class DataPermissionHandlerImpl implements DataPermissionHandler { | ||||
|      * 构建本部门数据权限表达式 | ||||
|      * | ||||
|      * <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> | ||||
|      * | ||||
|      * @param dataPermission 数据权限 | ||||
| @@ -168,7 +168,7 @@ public class DataPermissionHandlerImpl implements DataPermissionHandler { | ||||
|      * 构建仅本人数据权限表达式 | ||||
|      * | ||||
|      * <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> | ||||
|      * | ||||
|      * @param dataPermission 数据权限 | ||||
| @@ -190,8 +190,8 @@ public class DataPermissionHandlerImpl implements DataPermissionHandler { | ||||
|      * 构建自定义数据权限表达式 | ||||
|      * | ||||
|      * <p> | ||||
|      * 处理完后的 SQL 示例:<br /> select t1.* from table as t1 where t1.`dept_id` in (select `dept_id` from `sys_role_dept` | ||||
|      * where `role_id` = xxx); | ||||
|      * 处理完后的 SQL 示例:<br /> select t1.* from table as t1 where t1.dept_id in (select dept_id from sys_role_dept | ||||
|      * where role_id = xxx); | ||||
|      * </p> | ||||
|      * | ||||
|      * @param dataPermission 数据权限 | ||||
|   | ||||
| @@ -25,72 +25,72 @@ package top.charles7c.continew.starter.data.mybatis.plus.query; | ||||
| public enum QueryType { | ||||
|  | ||||
|     /** | ||||
|      * 等于 =,例如:WHERE `age` = 18 | ||||
|      * 等于 =,例如:WHERE age = 18 | ||||
|      */ | ||||
|     EQ, | ||||
|  | ||||
|     /** | ||||
|      * 不等于 !=,例如:WHERE `age` != 18 | ||||
|      * 不等于 !=,例如:WHERE age != 18 | ||||
|      */ | ||||
|     NE, | ||||
|  | ||||
|     /** | ||||
|      * 大于 >,例如:WHERE `age` > 18 | ||||
|      * 大于 >,例如:WHERE age > 18 | ||||
|      */ | ||||
|     GT, | ||||
|  | ||||
|     /** | ||||
|      * 大于等于 >= ,例如:WHERE `age` >= 18 | ||||
|      * 大于等于 >= ,例如:WHERE age >= 18 | ||||
|      */ | ||||
|     GE, | ||||
|  | ||||
|     /** | ||||
|      * 小于 <,例如:WHERE `age` < 18 | ||||
|      * 小于 <,例如:WHERE age < 18 | ||||
|      */ | ||||
|     LT, | ||||
|  | ||||
|     /** | ||||
|      * 小于等于 <=,例如:WHERE `age` <= 18 | ||||
|      * 小于等于 <=,例如:WHERE age <= 18 | ||||
|      */ | ||||
|     LE, | ||||
|  | ||||
|     /** | ||||
|      * 范围查询,例如:WHERE `age` BETWEEN 10 AND 18 | ||||
|      * 范围查询,例如:WHERE age BETWEEN 10 AND 18 | ||||
|      */ | ||||
|     BETWEEN, | ||||
|  | ||||
|     /** | ||||
|      * LIKE '%值%',例如:WHERE `nickname` LIKE '%s%' | ||||
|      * LIKE '%值%',例如:WHERE nickname LIKE '%s%' | ||||
|      */ | ||||
|     LIKE, | ||||
|  | ||||
|     /** | ||||
|      * LIKE '%值',例如:WHERE `nickname` LIKE '%s' | ||||
|      * LIKE '%值',例如:WHERE nickname LIKE '%s' | ||||
|      */ | ||||
|     LIKE_LEFT, | ||||
|  | ||||
|     /** | ||||
|      * LIKE '值%',例如:WHERE `nickname` LIKE 's%' | ||||
|      * LIKE '值%',例如:WHERE nickname LIKE 's%' | ||||
|      */ | ||||
|     LIKE_RIGHT, | ||||
|  | ||||
|     /** | ||||
|      * 包含查询,例如:WHERE `age` IN (10, 20, 30) | ||||
|      * 包含查询,例如:WHERE age IN (10, 20, 30) | ||||
|      */ | ||||
|     IN, | ||||
|  | ||||
|     /** | ||||
|      * 不包含查询,例如:WHERE `age` NOT IN (20, 30) | ||||
|      * 不包含查询,例如:WHERE age NOT IN (20, 30) | ||||
|      */ | ||||
|     NOT_IN, | ||||
|  | ||||
|     /** | ||||
|      * 空查询,例如:WHERE `email` IS NULL | ||||
|      * 空查询,例如:WHERE email IS NULL | ||||
|      */ | ||||
|     IS_NULL, | ||||
|  | ||||
|     /** | ||||
|      * 非空查询,例如:WHERE `email` IS NOT NULL | ||||
|      * 非空查询,例如:WHERE email IS NOT NULL | ||||
|      */ | ||||
|     IS_NOT_NULL,; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user