新增角色编码字段
This commit is contained in:
parent
7a176f40fb
commit
bf5a15add3
|
@ -23,6 +23,10 @@ public class SysRoleEntity extends BaseEntity {
|
|||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 角色编码
|
||||
*/
|
||||
private String roleCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
|
|
@ -27,6 +27,10 @@ public class SysRoleVO implements Serializable {
|
|||
@Schema(description = "角色名称")
|
||||
@NotBlank(message = "角色名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "角色编码")
|
||||
@NotBlank(message = "角色编码不能为空")
|
||||
private String roleCode;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
|
|
@ -8,4 +8,9 @@
|
|||
where t1.id = t2.role_id and t2.user_id = #{userId} and t1.deleted = 0 and t2.deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="geRoleCodeByUserId" resultType="string">
|
||||
select t1.role_code from sys_role t1, sys_user_role t2
|
||||
where t1.id = t2.role_id and t2.user_id = #{userId} and t1.deleted = 0 and t2.deleted = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user