fix: sql error

This commit is contained in:
2024-02-23 10:51:46 +08:00
parent dd9fa4b28b
commit 66f6b0787b
3 changed files with 5 additions and 4 deletions

View File

@@ -9,5 +9,6 @@ package com.landaiqing.auth.domain.constants;
public class AuthConstant {
public static final String NORMAL_USER = "normal_user";
public static final String ADMIN = "admin";
}

View File

@@ -76,7 +76,7 @@ public class AuthUserDomainServiceImpl implements AuthUserDomainService {
// 用户和角色关联
AuthRole authRole=new AuthRole();
authRole.setRoleKey(AuthConstant.NORMAL_USER);
authRole.setRoleKey(AuthConstant.ADMIN);
AuthRole roleResult = authRoleService.queryByCondition(authRole);
Long roleId = roleResult.getId();
Long userId = authUser.getId();

View File

@@ -17,7 +17,7 @@
<select id="queryById" resultMap="AuthRolePermissionMap">
select
id, role_id, permission_id, created_by, created_time, update_by, update_time, is_deleted
from auth_role_premission
from auth_role_permission
where id = #{id}
</select>
@@ -88,7 +88,7 @@
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into auth_role_premission(role_id, permission_id, created_by, created_time, update_by, update_time, is_deleted)
insert into auth_role_permission(role_id, permission_id, created_by, created_time, update_by, update_time, is_deleted)
values (#{roleId}, #{permissionId}, #{createdBy}, #{createdTime}, #{updateBy}, #{updateTime}, #{isDeleted})
</insert>
@@ -149,7 +149,7 @@
<!--通过主键删除-->
<delete id="deleteById">
delete from auth_role_premission where id = #{id}
delete from auth_role_permission where id = #{id}
</delete>
</mapper>