fix: sql error
This commit is contained in:
@@ -9,5 +9,6 @@ package com.landaiqing.auth.domain.constants;
|
|||||||
public class AuthConstant {
|
public class AuthConstant {
|
||||||
|
|
||||||
public static final String NORMAL_USER = "normal_user";
|
public static final String NORMAL_USER = "normal_user";
|
||||||
|
public static final String ADMIN = "admin";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -76,7 +76,7 @@ public class AuthUserDomainServiceImpl implements AuthUserDomainService {
|
|||||||
|
|
||||||
// 用户和角色关联
|
// 用户和角色关联
|
||||||
AuthRole authRole=new AuthRole();
|
AuthRole authRole=new AuthRole();
|
||||||
authRole.setRoleKey(AuthConstant.NORMAL_USER);
|
authRole.setRoleKey(AuthConstant.ADMIN);
|
||||||
AuthRole roleResult = authRoleService.queryByCondition(authRole);
|
AuthRole roleResult = authRoleService.queryByCondition(authRole);
|
||||||
Long roleId = roleResult.getId();
|
Long roleId = roleResult.getId();
|
||||||
Long userId = authUser.getId();
|
Long userId = authUser.getId();
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
<select id="queryById" resultMap="AuthRolePermissionMap">
|
<select id="queryById" resultMap="AuthRolePermissionMap">
|
||||||
select
|
select
|
||||||
id, role_id, permission_id, created_by, created_time, update_by, update_time, is_deleted
|
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}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
<!--新增所有列-->
|
<!--新增所有列-->
|
||||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
<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})
|
values (#{roleId}, #{permissionId}, #{createdBy}, #{createdTime}, #{updateBy}, #{updateTime}, #{isDeleted})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
|
|
||||||
<!--通过主键删除-->
|
<!--通过主键删除-->
|
||||||
<delete id="deleteById">
|
<delete id="deleteById">
|
||||||
delete from auth_role_premission where id = #{id}
|
delete from auth_role_permission where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Reference in New Issue
Block a user