Compare commits
2 Commits
1e4fb52905
...
2f04a305be
Author | SHA1 | Date | |
---|---|---|---|
2f04a305be | |||
bc82a1bfd1 |
@ -86,8 +86,10 @@ public class RoleServiceImpl extends ServiceImpl<RoleRepository, Role> implement
|
|||||||
throw new ConstraintException("name", dto.getName(), "同名角色已存在");
|
throw new ConstraintException("name", dto.getName(), "同名角色已存在");
|
||||||
}
|
}
|
||||||
mapper.convert(dto, existingRole);
|
mapper.convert(dto, existingRole);
|
||||||
|
if (existingRole.getAuthorities() != null) {
|
||||||
roleAuthService.remove(new LambdaQueryWrapper<RoleAuthority>().eq(RoleAuthority::getRoleId, id));
|
roleAuthService.remove(new LambdaQueryWrapper<RoleAuthority>().eq(RoleAuthority::getRoleId, id));
|
||||||
saveRoleAuths(id, dto.getAuthorities());
|
saveRoleAuths(id, dto.getAuthorities());
|
||||||
|
}
|
||||||
return updateById(existingRole);
|
return updateById(existingRole);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -688,29 +688,3 @@ comment on column sys_user.enable_state is '状态';
|
|||||||
alter table sys_user
|
alter table sys_user
|
||||||
owner to gitea;
|
owner to gitea;
|
||||||
|
|
||||||
-- 插入备份的数据
|
|
||||||
INSERT INTO sys_user (dept_id, role_id, username, password, phone, email, name, avatar, address, create_by, update_by,
|
|
||||||
create_time, update_time, remark, enable_state)
|
|
||||||
SELECT dept_id,
|
|
||||||
role_id,
|
|
||||||
username,
|
|
||||||
password,
|
|
||||||
phone,
|
|
||||||
email,
|
|
||||||
name,
|
|
||||||
avatar,
|
|
||||||
address,
|
|
||||||
create_by,
|
|
||||||
update_by,
|
|
||||||
create_time,
|
|
||||||
update_time,
|
|
||||||
remark,
|
|
||||||
enable_state
|
|
||||||
FROM sys_user_backup;
|
|
||||||
|
|
||||||
-- 删除备份表
|
|
||||||
DROP TABLE sys_user_backup;
|
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE iot_property
|
|
||||||
ALTER COLUMN id ADD GENERATED ALWAYS AS IDENTITY;
|
|
@ -22,7 +22,7 @@
|
|||||||
<result column="create_time" jdbcType="DATE" property="deviceCreateTime"/>
|
<result column="create_time" jdbcType="DATE" property="deviceCreateTime"/>
|
||||||
<result column="update_time" jdbcType="DATE" property="deviceUpdateTime"/>
|
<result column="update_time" jdbcType="DATE" property="deviceUpdateTime"/>
|
||||||
<result column="remark" jdbcType="VARCHAR" property="deviceRemark"/>
|
<result column="remark" jdbcType="VARCHAR" property="deviceRemark"/>
|
||||||
<result column="name" property="name"/>
|
<result column="name" property="productName"/>
|
||||||
<result column="product_type" jdbcType="VARCHAR" property="productType"/>
|
<result column="product_type" jdbcType="VARCHAR" property="productType"/>
|
||||||
<result column="model" property="model"/>
|
<result column="model" property="model"/>
|
||||||
<result column="link" property="link"/>
|
<result column="link" property="link"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user