diff --git a/continew-admin-monitor/src/main/resources/mapper/LogMapper.xml b/continew-admin-monitor/src/main/resources/mapper/LogMapper.xml
index e8b2b467..d482d5e4 100644
--- a/continew-admin-monitor/src/main/resources/mapper/LogMapper.xml
+++ b/continew-admin-monitor/src/main/resources/mapper/LogMapper.xml
@@ -3,46 +3,46 @@
\ No newline at end of file
diff --git a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/mapper/RoleDeptMapper.java b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/mapper/RoleDeptMapper.java
index efed6bfb..992f7642 100644
--- a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/mapper/RoleDeptMapper.java
+++ b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/mapper/RoleDeptMapper.java
@@ -16,14 +16,13 @@
package top.charles7c.continew.admin.system.mapper;
-import java.util.List;
-
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
-
import top.charles7c.continew.admin.system.model.entity.RoleDeptDO;
import top.charles7c.continew.starter.data.mybatis.plus.base.BaseMapper;
+import java.util.List;
+
/**
* 角色和部门 Mapper
*
@@ -38,6 +37,6 @@ public interface RoleDeptMapper extends BaseMapper {
* @param roleId 角色 ID
* @return 部门 ID 列表
*/
- @Select("SELECT `dept_id` FROM `sys_role_dept` WHERE `role_id` = #{roleId}")
+ @Select("SELECT dept_id FROM sys_role_dept WHERE role_id = #{roleId}")
List selectDeptIdByRoleId(@Param("roleId") Long roleId);
}
diff --git a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/mapper/UserMapper.java b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/mapper/UserMapper.java
index dd02eb5f..68970b13 100644
--- a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/mapper/UserMapper.java
+++ b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/mapper/UserMapper.java
@@ -37,7 +37,7 @@ public interface UserMapper extends DataPermissionMapper {
* @param username 用户名
* @return 用户信息
*/
- @Select("SELECT * FROM `sys_user` WHERE `username` = #{username}")
+ @Select("SELECT * FROM sys_user WHERE username = #{username}")
UserDO selectByUsername(@Param("username") String username);
/**
@@ -46,7 +46,7 @@ public interface UserMapper extends DataPermissionMapper {
* @param phone 手机号
* @return 用户信息
*/
- @Select("SELECT * FROM `sys_user` WHERE `phone` = #{phone}")
+ @Select("SELECT * FROM sys_user WHERE phone = #{phone}")
UserDO selectByPhone(@FieldEncrypt @Param("phone") String phone);
/**
@@ -55,7 +55,7 @@ public interface UserMapper extends DataPermissionMapper {
* @param email 邮箱
* @return 用户信息
*/
- @Select("SELECT * FROM `sys_user` WHERE `email` = #{email}")
+ @Select("SELECT * FROM sys_user WHERE email = #{email}")
UserDO selectByEmail(@FieldEncrypt @Param("email") String email);
/**
@@ -64,6 +64,6 @@ public interface UserMapper extends DataPermissionMapper {
* @param id ID
* @return 昵称
*/
- @Select("SELECT `nickname` FROM `sys_user` WHERE `id` = #{id}")
+ @Select("SELECT nickname FROM sys_user WHERE id = #{id}")
String selectNicknameById(@Param("id") Long id);
}
diff --git a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/mapper/UserRoleMapper.java b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/mapper/UserRoleMapper.java
index 28e09e61..9705fb80 100644
--- a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/mapper/UserRoleMapper.java
+++ b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/mapper/UserRoleMapper.java
@@ -38,6 +38,6 @@ public interface UserRoleMapper extends BaseMapper {
* @param userId 用户 ID
* @return 角色 ID 列表
*/
- @Select("SELECT `role_id` FROM `sys_user_role` WHERE `user_id` = #{userId}")
+ @Select("SELECT role_id FROM sys_user_role WHERE user_id = #{userId}")
List selectRoleIdByUserId(@Param("userId") Long userId);
}
diff --git a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/service/impl/DeptServiceImpl.java b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/service/impl/DeptServiceImpl.java
index 5d7a42d3..1c8cda3d 100644
--- a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/service/impl/DeptServiceImpl.java
+++ b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/service/impl/DeptServiceImpl.java
@@ -155,7 +155,7 @@ public class DeptServiceImpl extends BaseServiceImpl listChildren(Long id) {
- return baseMapper.lambdaQuery().apply(String.format("find_in_set(%s, `ancestors`)", id)).list();
+ return baseMapper.lambdaQuery().apply(String.format("find_in_set(%s, ancestors)", id)).list();
}
/**
@@ -170,7 +170,7 @@ public class DeptServiceImpl extends BaseServiceImpl baseMapper.lambdaQuery().apply(String.format("find_in_set(%s, `ancestors`)", id)).count())
+ .mapToLong(id -> baseMapper.lambdaQuery().apply(String.format("find_in_set(%s, ancestors)", id)).count())
.sum();
}
diff --git a/continew-admin-system/src/main/resources/mapper/AnnouncementMapper.xml b/continew-admin-system/src/main/resources/mapper/AnnouncementMapper.xml
index db5211f9..1990d815 100644
--- a/continew-admin-system/src/main/resources/mapper/AnnouncementMapper.xml
+++ b/continew-admin-system/src/main/resources/mapper/AnnouncementMapper.xml
@@ -5,11 +5,11 @@
\ No newline at end of file
diff --git a/continew-admin-system/src/main/resources/mapper/DictItemMapper.xml b/continew-admin-system/src/main/resources/mapper/DictItemMapper.xml
index 84e2355b..93bd02e7 100644
--- a/continew-admin-system/src/main/resources/mapper/DictItemMapper.xml
+++ b/continew-admin-system/src/main/resources/mapper/DictItemMapper.xml
@@ -2,10 +2,10 @@
\ No newline at end of file
diff --git a/continew-admin-system/src/main/resources/mapper/MenuMapper.xml b/continew-admin-system/src/main/resources/mapper/MenuMapper.xml
index 24fa3c4f..6fdeae33 100644
--- a/continew-admin-system/src/main/resources/mapper/MenuMapper.xml
+++ b/continew-admin-system/src/main/resources/mapper/MenuMapper.xml
@@ -2,25 +2,25 @@
\ No newline at end of file
diff --git a/continew-admin-system/src/main/resources/mapper/MessageMapper.xml b/continew-admin-system/src/main/resources/mapper/MessageMapper.xml
index 14046597..4588b8d9 100644
--- a/continew-admin-system/src/main/resources/mapper/MessageMapper.xml
+++ b/continew-admin-system/src/main/resources/mapper/MessageMapper.xml
@@ -4,11 +4,11 @@
diff --git a/continew-admin-system/src/main/resources/mapper/MessageUserMapper.xml b/continew-admin-system/src/main/resources/mapper/MessageUserMapper.xml
index e8b6a909..d762bb6c 100644
--- a/continew-admin-system/src/main/resources/mapper/MessageUserMapper.xml
+++ b/continew-admin-system/src/main/resources/mapper/MessageUserMapper.xml
@@ -3,12 +3,12 @@
\ No newline at end of file
diff --git a/continew-admin-system/src/main/resources/mapper/RoleMenuMapper.xml b/continew-admin-system/src/main/resources/mapper/RoleMenuMapper.xml
index 827b0fec..5b8d82d6 100644
--- a/continew-admin-system/src/main/resources/mapper/RoleMenuMapper.xml
+++ b/continew-admin-system/src/main/resources/mapper/RoleMenuMapper.xml
@@ -2,9 +2,9 @@
\ No newline at end of file
diff --git a/continew-admin-tool/src/main/java/top/charles7c/continew/admin/tool/enums/QueryTypeEnum.java b/continew-admin-tool/src/main/java/top/charles7c/continew/admin/tool/enums/QueryTypeEnum.java
index 0404d3f8..60107013 100644
--- a/continew-admin-tool/src/main/java/top/charles7c/continew/admin/tool/enums/QueryTypeEnum.java
+++ b/continew-admin-tool/src/main/java/top/charles7c/continew/admin/tool/enums/QueryTypeEnum.java
@@ -32,72 +32,72 @@ import top.charles7c.continew.starter.data.mybatis.plus.base.IBaseEnum;
public enum QueryTypeEnum implements IBaseEnum {
/**
- * 等于 =,例如:WHERE `age` = 18
+ * 等于 =,例如:WHERE age = 18
*/
EQ(1, "="),
/**
- * 不等于 !=,例如:WHERE `age` != 18
+ * 不等于 !=,例如:WHERE age != 18
*/
NE(2, "!="),
/**
- * 大于 >,例如:WHERE `age` > 18
+ * 大于 >,例如:WHERE age > 18
*/
GT(3, ">"),
/**
- * 大于等于 >= ,例如:WHERE `age` >= 18
+ * 大于等于 >= ,例如:WHERE age >= 18
*/
GE(4, ">="),
/**
- * 小于 <,例如:WHERE `age` < 18
+ * 小于 <,例如:WHERE age < 18
*/
LT(5, "<"),
/**
- * 小于等于 <=,例如:WHERE `age` <= 18
+ * 小于等于 <=,例如:WHERE age <= 18
*/
LE(6, "<="),
/**
- * 范围查询,例如:WHERE `age` BETWEEN 10 AND 18
+ * 范围查询,例如:WHERE age BETWEEN 10 AND 18
*/
BETWEEN(7, "BETWEEN"),
/**
- * LIKE '%值%',例如:WHERE `nickname` LIKE '%s%'
+ * LIKE '%值%',例如:WHERE nickname LIKE '%s%'
*/
LIKE(8, "LIKE '%s%'"),
/**
- * LIKE '%值',例如:WHERE `nickname` LIKE '%s'
+ * LIKE '%值',例如:WHERE nickname LIKE '%s'
*/
LIKE_LEFT(9, "LIKE '%s'"),
/**
- * LIKE '值%',例如:WHERE `nickname` LIKE 's%'
+ * LIKE '值%',例如:WHERE nickname LIKE 's%'
*/
LIKE_RIGHT(10, "LIKE 's%'"),
/**
- * 包含查询,例如:WHERE `age` IN (10, 20, 30)
+ * 包含查询,例如:WHERE age IN (10, 20, 30)
*/
IN(11, "IN"),
/**
- * 不包含查询,例如:WHERE `age` NOT IN (20, 30)
+ * 不包含查询,例如:WHERE age NOT IN (20, 30)
*/
NOT_IN(12, "NOT IN"),
/**
- * 空查询,例如:WHERE `email` IS NULL
+ * 空查询,例如:WHERE email IS NULL
*/
IS_NULL(13, "IS NULL"),
/**
- * 非空查询,例如:WHERE `email` IS NOT NULL
+ * 非空查询,例如:WHERE email IS NOT NULL
*/
IS_NOT_NULL(14, "IS NOT NULL"),;
diff --git a/continew-admin-tool/src/main/java/top/charles7c/continew/admin/tool/mapper/FieldConfigMapper.java b/continew-admin-tool/src/main/java/top/charles7c/continew/admin/tool/mapper/FieldConfigMapper.java
index 13ffa338..23273270 100644
--- a/continew-admin-tool/src/main/java/top/charles7c/continew/admin/tool/mapper/FieldConfigMapper.java
+++ b/continew-admin-tool/src/main/java/top/charles7c/continew/admin/tool/mapper/FieldConfigMapper.java
@@ -16,14 +16,13 @@
package top.charles7c.continew.admin.tool.mapper;
-import java.util.List;
-
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
-
import top.charles7c.continew.admin.tool.model.entity.FieldConfigDO;
import top.charles7c.continew.starter.data.mybatis.plus.base.BaseMapper;
+import java.util.List;
+
/**
* 字段配置 Mapper
*
@@ -38,6 +37,6 @@ public interface FieldConfigMapper extends BaseMapper {
* @param tableName 表名称
* @return 字段配置信息
*/
- @Select("SELECT * FROM `gen_field_config` WHERE `table_name` = #{tableName}")
+ @Select("SELECT * FROM gen_field_config WHERE table_name = #{tableName}")
List selectListByTableName(@Param("tableName") String tableName);
}