feat;增加角色模块

This commit is contained in:
曾文豪
2024-06-24 19:15:47 +08:00
parent 0e6bee4714
commit 80cd48b97c
51 changed files with 1635 additions and 77 deletions

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.tiesheng.role.mapper.CoreRoleAuthorityMapper">
<resultMap id="BaseResultMap" type="com.tiesheng.role.pojos.dao.CoreRoleAuthority">
<!--@mbg.generated-->
<!--@Table core_role_authority-->
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_deleted" jdbcType="INTEGER" property="isDeleted" />
<result column="service" jdbcType="VARCHAR" property="service" />
<result column="no" jdbcType="VARCHAR" property="no" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="level" jdbcType="INTEGER" property="level" />
<result column="parent" jdbcType="VARCHAR" property="parent" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="is_open" jdbcType="INTEGER" property="isOpen" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="link" jdbcType="LONGVARCHAR" property="link" />
<result column="platform" jdbcType="VARCHAR" property="platform" />
<result column="ext1" jdbcType="VARCHAR" property="ext1" />
<result column="ext2" jdbcType="VARCHAR" property="ext2" />
<result column="ext3" jdbcType="VARCHAR" property="ext3" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, create_time, update_time, is_deleted, service, `no`, `name`, sort, `level`, parent,
remark, is_open, `type`, link, platform, ext1, ext2, ext3
</sql>
</mapper>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.tiesheng.role.mapper.CoreRoleGroupMapper">
<resultMap id="BaseResultMap" type="com.tiesheng.role.pojos.dao.CoreRoleGroup">
<!--@mbg.generated-->
<!--@Table core_role_group-->
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_deleted" jdbcType="INTEGER" property="isDeleted" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="is_system" jdbcType="INTEGER" property="isSystem" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="ext1" jdbcType="VARCHAR" property="ext1" />
<result column="ext2" jdbcType="VARCHAR" property="ext2" />
<result column="ext3" jdbcType="VARCHAR" property="ext3" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, create_time, update_time, is_deleted, `name`, remark, `type`, is_system, sort,
ext1, ext2, ext3
</sql>
</mapper>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.tiesheng.role.mapper.CoreRoleServerMapper">
<resultMap id="BaseResultMap" type="com.tiesheng.role.pojos.dao.CoreRoleServer">
<!--@mbg.generated-->
<!--@Table core_role_server-->
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_deleted" jdbcType="INTEGER" property="isDeleted" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="logo" jdbcType="VARCHAR" property="logo" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="is_open" jdbcType="INTEGER" property="isOpen" />
<result column="link" jdbcType="VARCHAR" property="link" />
<result column="ext1" jdbcType="VARCHAR" property="ext1" />
<result column="ext2" jdbcType="VARCHAR" property="ext2" />
<result column="ext3" jdbcType="VARCHAR" property="ext3" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, create_time, update_time, is_deleted, `name`, remark, logo, sort, is_open, link,
ext1, ext2, ext3
</sql>
</mapper>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.tiesheng.role.mapper.CoreRoleUserMapper">
<resultMap id="BaseResultMap" type="com.tiesheng.role.pojos.dao.CoreRoleUser">
<!--@mbg.generated-->
<!--@Table core_role_user-->
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_deleted" jdbcType="INTEGER" property="isDeleted" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="type_id" jdbcType="VARCHAR" property="typeId" />
<result column="expire_time" jdbcType="TIMESTAMP" property="expireTime" />
<result column="ext1" jdbcType="VARCHAR" property="ext1" />
<result column="ext2" jdbcType="VARCHAR" property="ext2" />
<result column="ext3" jdbcType="VARCHAR" property="ext3" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, create_time, update_time, is_deleted, user_id, `type`, type_id, expire_time,
ext1, ext2, ext3
</sql>
<select id="page" resultType="com.tiesheng.role.pojos.vo.RoleUserPageVO">
select *,
(case cru.type
when 'menu' then (select name from core_role_authority where id = cru.type_id and is_deleted = 0)
when 'job' then (select name from core_role_group where id = cru.type_id and is_deleted = 0)
else '' end) type_name
from core_role_user cru
${ew.customSqlSegment}
</select>
</mapper>