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,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>