parent
bfe318e79c
commit
48a4ea62c4
30 changed files with 0 additions and 1294 deletions
@ -1,10 +0,0 @@ |
||||
#服务器端口 |
||||
server: |
||||
port: 8106 |
||||
|
||||
#数据源配置 |
||||
spring: |
||||
datasource: |
||||
url: ${blade.datasource.dev.url} |
||||
username: ${blade.datasource.dev.username} |
||||
password: ${blade.datasource.dev.password} |
||||
@ -1,10 +0,0 @@ |
||||
#服务器端口 |
||||
server: |
||||
port: 8106 |
||||
|
||||
#数据源配置 |
||||
spring: |
||||
datasource: |
||||
url: ${blade.datasource.prod.url} |
||||
username: ${blade.datasource.prod.username} |
||||
password: ${blade.datasource.prod.password} |
||||
@ -1,10 +0,0 @@ |
||||
#服务器端口 |
||||
server: |
||||
port: 8106 |
||||
|
||||
#数据源配置 |
||||
spring: |
||||
datasource: |
||||
url: ${blade.datasource.test.url} |
||||
username: ${blade.datasource.test.username} |
||||
password: ${blade.datasource.test.password} |
||||
|
Before Width: | Height: | Size: 105 KiB |
@ -1,16 +0,0 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<flow> |
||||
<chain name="tenantChain"> |
||||
THEN( |
||||
tenantRule, |
||||
WHEN( |
||||
tenantRoleRule, |
||||
tenantRoleMenuRule, |
||||
tenantDeptRule, |
||||
tenantPostRule, |
||||
tenantDictBizRule, |
||||
tenantUserRule |
||||
) |
||||
); |
||||
</chain> |
||||
</flow> |
||||
@ -1,5 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.ApiScopeMapper"> |
||||
|
||||
</mapper> |
||||
@ -1,27 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.AuthClientMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="clientResultMap" type="org.springblade.system.pojo.entity.AuthClient"> |
||||
<result column="id" property="id"/> |
||||
<result column="create_user" property="createUser"/> |
||||
<result column="create_time" property="createTime"/> |
||||
<result column="update_user" property="updateUser"/> |
||||
<result column="update_time" property="updateTime"/> |
||||
<result column="status" property="status"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
<result column="client_id" property="clientId"/> |
||||
<result column="client_secret" property="clientSecret"/> |
||||
<result column="resources_ids" property="resourceIds"/> |
||||
<result column="scope" property="scope"/> |
||||
<result column="authorized_grant_types" property="authorizedGrantTypes"/> |
||||
<result column="web_server_redirect_uri" property="webServerRedirectUri"/> |
||||
<result column="authorities" property="authorities"/> |
||||
<result column="access_token_validity" property="accessTokenValidity"/> |
||||
<result column="refresh_token_validity" property="refreshTokenValidity"/> |
||||
<result column="additional_information" property="additionalInformation"/> |
||||
<result column="autoapprove" property="autoapprove"/> |
||||
</resultMap> |
||||
|
||||
</mapper> |
||||
@ -1,5 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.DataScopeMapper"> |
||||
|
||||
</mapper> |
||||
@ -1,115 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.DeptMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="deptResultMap" type="org.springblade.system.pojo.entity.Dept"> |
||||
<id column="id" property="id"/> |
||||
<result column="parent_id" property="parentId"/> |
||||
<result column="dept_name" property="deptName"/> |
||||
<result column="full_name" property="fullName"/> |
||||
<result column="ancestors" property="ancestors"/> |
||||
<result column="dept_category" property="deptCategory"/> |
||||
<result column="sort" property="sort"/> |
||||
<result column="remark" property="remark"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
</resultMap> |
||||
|
||||
<resultMap id="deptVOResultMap" type="org.springblade.system.pojo.vo.DeptVO"> |
||||
<id column="id" property="id"/> |
||||
<result column="parent_id" property="parentId"/> |
||||
<result column="dept_name" property="deptName"/> |
||||
<result column="full_name" property="fullName"/> |
||||
<result column="ancestors" property="ancestors"/> |
||||
<result column="dept_category" property="deptCategory"/> |
||||
<result column="sort" property="sort"/> |
||||
<result column="remark" property="remark"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
<result column="has_children" property="hasChildren"/> |
||||
</resultMap> |
||||
|
||||
<resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode"> |
||||
<id column="id" property="id"/> |
||||
<result column="parent_id" property="parentId"/> |
||||
<result column="title" property="title"/> |
||||
<result column="value" property="value"/> |
||||
<result column="key" property="key"/> |
||||
<result column="has_children" property="hasChildren"/> |
||||
</resultMap> |
||||
|
||||
<select id="lazyList" resultMap="deptVOResultMap"> |
||||
SELECT |
||||
dept.* , |
||||
( |
||||
SELECT |
||||
CASE WHEN count(1) > 0 THEN 1 ELSE 0 END |
||||
FROM |
||||
blade_dept |
||||
WHERE |
||||
parent_id = dept.id and is_deleted = 0 |
||||
) AS "has_children" |
||||
FROM |
||||
blade_dept dept |
||||
WHERE dept.is_deleted = 0 |
||||
<if test="param1!=null and param1!=''"> |
||||
and dept.tenant_id = #{param1} |
||||
</if> |
||||
<if test="param2!=null"> |
||||
and dept.parent_id = #{param2} |
||||
</if> |
||||
<if test="param3.deptName!=null and param3.deptName!=''"> |
||||
and dept.dept_name like concat(concat('%', #{param3.deptName}),'%') |
||||
</if> |
||||
<if test="param3.fullName!=null and param3.fullName!=''"> |
||||
and dept.full_name like concat(concat('%', #{param3.fullName}),'%') |
||||
</if> |
||||
ORDER BY dept.sort |
||||
</select> |
||||
|
||||
<select id="tree" resultMap="treeNodeResultMap"> |
||||
select id, parent_id, dept_name as title, id as "value", id as "key" from blade_dept where is_deleted = 0 |
||||
<if test="_parameter!=null and _parameter!=''"> |
||||
and tenant_id = #{_parameter} |
||||
</if> |
||||
ORDER BY sort |
||||
</select> |
||||
|
||||
<select id="lazyTree" resultMap="treeNodeResultMap" > |
||||
SELECT |
||||
dept.id, |
||||
dept.parent_id, |
||||
dept.dept_name AS title, |
||||
dept.id AS "value", |
||||
dept.id AS "key", |
||||
( |
||||
SELECT |
||||
CASE WHEN count(1) > 0 THEN 1 ELSE 0 END |
||||
FROM |
||||
blade_dept |
||||
WHERE |
||||
parent_id = dept.id and is_deleted = 0 |
||||
) AS "has_children" |
||||
FROM |
||||
blade_dept dept |
||||
WHERE |
||||
dept.parent_id = #{param2} AND dept.is_deleted = 0 |
||||
<if test="param1!=null and param1!=''"> |
||||
and dept.tenant_id = #{param1} |
||||
</if> |
||||
ORDER BY dept.sort |
||||
</select> |
||||
|
||||
<select id="getDeptNames" resultType="java.lang.String"> |
||||
SELECT |
||||
dept_name |
||||
FROM |
||||
blade_dept |
||||
WHERE |
||||
id IN |
||||
<foreach collection="array" item="ids" index="index" open="(" close=")" separator=","> |
||||
#{ids} |
||||
</foreach> |
||||
and is_deleted = 0 |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -1,51 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.DictBizMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="dictResultMap" type="org.springblade.system.pojo.entity.DictBiz"> |
||||
<id column="id" property="id"/> |
||||
<result column="tenant_id" property="tenantId"/> |
||||
<result column="parent_id" property="parentId"/> |
||||
<result column="code" property="code"/> |
||||
<result column="dict_key" property="dictKey"/> |
||||
<result column="dict_value" property="dictValue"/> |
||||
<result column="sort" property="sort"/> |
||||
<result column="remark" property="remark"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
</resultMap> |
||||
|
||||
<resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode"> |
||||
<id column="id" property="id"/> |
||||
<result column="parent_id" property="parentId"/> |
||||
<result column="title" property="title"/> |
||||
<result column="value" property="value"/> |
||||
<result column="key" property="key"/> |
||||
</resultMap> |
||||
|
||||
<select id="getValue" resultType="java.lang.String"> |
||||
select |
||||
dict_value |
||||
from blade_dict_biz where tenant_id = #{param1} and code = #{param2} and dict_key = #{param3} and is_deleted = 0 |
||||
</select> |
||||
|
||||
<!-- oracle 版本 --> |
||||
<!--<select id="getValue" resultType="java.lang.String"> |
||||
select |
||||
dict_value |
||||
from blade_dict_biz where code = #{param1, jdbcType=VARCHAR} and dict_key = #{param2} and dict_key >= 0 rownum 1 |
||||
</select>--> |
||||
|
||||
<select id="getList" resultMap="dictResultMap"> |
||||
select id, tenant_id, parent_id, code, dict_key, dict_value, sort, remark from blade_dict_biz where tenant_id = #{param1} and code = #{param2} and parent_id > 0 and is_sealed = 0 and is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="tree" resultMap="treeNodeResultMap"> |
||||
select id, parent_id, dict_value as title, id as "value", id as "key" from blade_dict_biz where is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="parentTree" resultMap="treeNodeResultMap"> |
||||
select id, parent_id, dict_value as title, id as "value", id as "key" from blade_dict_biz where is_deleted = 0 and parent_id = 0 |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -1,54 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.DictMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="dictResultMap" type="org.springblade.system.pojo.entity.Dict"> |
||||
<id column="id" property="id"/> |
||||
<result column="parent_id" property="parentId"/> |
||||
<result column="code" property="code"/> |
||||
<result column="dict_key" property="dictKey"/> |
||||
<result column="dict_value" property="dictValue"/> |
||||
<result column="sort" property="sort"/> |
||||
<result column="remark" property="remark"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
</resultMap> |
||||
|
||||
<resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode"> |
||||
<id column="id" property="id"/> |
||||
<result column="parent_id" property="parentId"/> |
||||
<result column="title" property="title"/> |
||||
<result column="value" property="value"/> |
||||
<result column="key" property="key"/> |
||||
</resultMap> |
||||
|
||||
<select id="selectDictPage" resultMap="dictResultMap"> |
||||
select * from blade_dict where is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="getValue" resultType="java.lang.String"> |
||||
select |
||||
dict_value |
||||
from blade_dict where code = #{param1} and dict_key = #{param2} and is_deleted = 0 |
||||
</select> |
||||
|
||||
<!-- oracle 版本 --> |
||||
<!--<select id="getValue" resultType="java.lang.String"> |
||||
select |
||||
dict_value |
||||
from blade_dict where code = #{param1, jdbcType=VARCHAR} and dict_key = #{param2} and dict_key >= 0 rownum 1 |
||||
</select>--> |
||||
|
||||
<select id="getList" resultMap="dictResultMap"> |
||||
select id, parent_id, code, dict_key, dict_value, sort, remark from blade_dict where code = #{param1} and parent_id > 0 and is_sealed = 0 and is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="tree" resultMap="treeNodeResultMap"> |
||||
select id, parent_id, dict_value as title, id as "value", id as "key" from blade_dict where is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="parentTree" resultMap="treeNodeResultMap"> |
||||
select id, parent_id, dict_value as title, id as "value", id as "key" from blade_dict where is_deleted = 0 and parent_id = 0 |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -1,478 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.MenuMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="menuResultMap" type="org.springblade.system.pojo.entity.Menu"> |
||||
<id column="id" property="id"/> |
||||
<result column="code" property="code"/> |
||||
<result column="parent_id" property="parentId"/> |
||||
<result column="name" property="name"/> |
||||
<result column="alias" property="alias"/> |
||||
<result column="path" property="path"/> |
||||
<result column="source" property="source"/> |
||||
<result column="sort" property="sort"/> |
||||
<result column="category" property="category"/> |
||||
<result column="action" property="action"/> |
||||
<result column="is_open" property="isOpen"/> |
||||
<result column="remark" property="remark"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
</resultMap> |
||||
|
||||
<resultMap id="menuVOResultMap" type="org.springblade.system.pojo.vo.MenuVO"> |
||||
<id column="id" property="id"/> |
||||
<result column="code" property="code"/> |
||||
<result column="parent_id" property="parentId"/> |
||||
<result column="name" property="name"/> |
||||
<result column="alias" property="alias"/> |
||||
<result column="path" property="path"/> |
||||
<result column="source" property="source"/> |
||||
<result column="sort" property="sort"/> |
||||
<result column="category" property="category"/> |
||||
<result column="action" property="action"/> |
||||
<result column="is_open" property="isOpen"/> |
||||
<result column="remark" property="remark"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
<result column="has_children" property="hasChildren"/> |
||||
</resultMap> |
||||
|
||||
<resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode"> |
||||
<id column="id" property="id"/> |
||||
<result column="parent_id" property="parentId"/> |
||||
<result column="title" property="title"/> |
||||
<result column="value" property="value"/> |
||||
<result column="key" property="key"/> |
||||
</resultMap> |
||||
|
||||
<select id="lazyList" resultMap="menuVOResultMap"> |
||||
SELECT |
||||
menu.*, |
||||
( |
||||
SELECT |
||||
CASE WHEN count( 1 ) > 0 THEN 1 ELSE 0 END |
||||
FROM |
||||
blade_menu |
||||
WHERE |
||||
parent_id = menu.id AND is_deleted = 0 |
||||
) AS "has_children" |
||||
FROM |
||||
blade_menu menu |
||||
WHERE menu.is_deleted = 0 |
||||
<if test="param1!=null"> |
||||
and menu.parent_id = #{param1} |
||||
</if> |
||||
<if test="param2.name!=null and param2.name!=''"> |
||||
and menu.name like concat(concat('%', #{param2.name}),'%') |
||||
</if> |
||||
<if test="param2.code!=null and param2.code!=''"> |
||||
and menu.code like concat(concat('%', #{param2.code}),'%') |
||||
</if> |
||||
<if test="param2.alias!=null and param2.alias!=''"> |
||||
and menu.alias like concat(concat('%', #{param2.alias}),'%') |
||||
</if> |
||||
ORDER BY menu.sort |
||||
</select> |
||||
|
||||
<select id="lazyMenuList" resultMap="menuVOResultMap"> |
||||
SELECT |
||||
menu.*, |
||||
( |
||||
SELECT |
||||
CASE WHEN count( 1 ) > 0 THEN 1 ELSE 0 END |
||||
FROM |
||||
blade_menu |
||||
WHERE |
||||
parent_id = menu.id AND is_deleted = 0 AND category = 1 |
||||
) AS "has_children" |
||||
FROM |
||||
blade_menu menu |
||||
WHERE menu.is_deleted = 0 AND menu.category = 1 |
||||
<if test="param1!=null"> |
||||
and menu.parent_id = #{param1} |
||||
</if> |
||||
<if test="param2.name!=null and param2.name!=''"> |
||||
and menu.name like concat(concat('%', #{param2.name}),'%') |
||||
</if> |
||||
<if test="param2.code!=null and param2.code!=''"> |
||||
and menu.code like concat(concat('%', #{param2.code}),'%') |
||||
</if> |
||||
<if test="param2.alias!=null and param2.alias!=''"> |
||||
and menu.alias like concat(concat('%', #{param2.alias}),'%') |
||||
</if> |
||||
ORDER BY menu.sort |
||||
</select> |
||||
|
||||
<select id="tree" resultMap="treeNodeResultMap"> |
||||
select id, parent_id, name as title, id as "value", id as "key" from blade_menu where is_deleted = 0 and category = 1 |
||||
</select> |
||||
|
||||
<select id="allMenu" resultMap="menuResultMap"> |
||||
select * from blade_menu where is_deleted = 0 and category = 1 |
||||
</select> |
||||
|
||||
<select id="roleMenu" resultMap="menuResultMap"> |
||||
select * from blade_menu where is_deleted = 0 and id IN |
||||
( SELECT menu_id FROM blade_role_menu WHERE role_id IN |
||||
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> |
||||
) |
||||
<if test="param2!=null and param2>0"> |
||||
AND id IN |
||||
( |
||||
SELECT menu_id FROM blade_top_menu_setting WHERE top_menu_id = #{param2} |
||||
) |
||||
</if> |
||||
</select> |
||||
|
||||
<select id="roleMenuByRoleId" resultMap="menuResultMap"> |
||||
select * from blade_menu where is_deleted = 0 and id IN |
||||
( SELECT menu_id FROM blade_role_menu WHERE role_id IN |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> |
||||
) |
||||
</select> |
||||
|
||||
<select id="roleMenuByTopMenuId" resultMap="menuResultMap"> |
||||
select * from blade_menu where is_deleted = 0 and id IN |
||||
( |
||||
SELECT menu_id FROM blade_top_menu_setting WHERE top_menu_id = #{param1} |
||||
) |
||||
</select> |
||||
|
||||
<select id="routes" resultMap="menuResultMap"> |
||||
SELECT |
||||
* |
||||
FROM |
||||
blade_menu |
||||
WHERE |
||||
is_deleted = 0 and category = 1 |
||||
and id IN ( SELECT menu_id FROM blade_role_menu WHERE role_id IN |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> ) |
||||
</select> |
||||
|
||||
<select id="allButtons" resultMap="menuResultMap"> |
||||
SELECT |
||||
id, |
||||
parent_id, |
||||
CODE, |
||||
NAME, |
||||
alias, |
||||
path, |
||||
source, |
||||
action, |
||||
sort |
||||
FROM |
||||
blade_menu |
||||
WHERE |
||||
( |
||||
category = 2 OR id IN ( SELECT parent_id FROM blade_menu WHERE is_deleted = 0 AND category = 2 ) |
||||
) |
||||
AND is_deleted = 0 |
||||
ORDER BY sort |
||||
</select> |
||||
|
||||
<select id="buttons" resultMap="menuResultMap"> |
||||
SELECT * FROM ( |
||||
SELECT |
||||
id, |
||||
parent_id, |
||||
code, |
||||
name, |
||||
alias, |
||||
path, |
||||
source, |
||||
action, |
||||
sort |
||||
FROM |
||||
blade_menu |
||||
WHERE |
||||
is_deleted = 0 and id IN ( |
||||
SELECT parent_id FROM blade_menu |
||||
WHERE ( category = 2 AND id IN ( SELECT menu_id FROM blade_role_menu WHERE role_id IN |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> |
||||
) ) ) |
||||
|
||||
UNION ALL |
||||
|
||||
SELECT |
||||
id, |
||||
parent_id, |
||||
code, |
||||
name, |
||||
alias, |
||||
path, |
||||
source, |
||||
action, |
||||
sort |
||||
FROM |
||||
blade_menu |
||||
WHERE |
||||
is_deleted = 0 and category = 2 AND id IN ( SELECT menu_id FROM blade_role_menu WHERE role_id IN |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach>) |
||||
) menu ORDER BY sort |
||||
</select> |
||||
|
||||
<select id="grantTree" resultMap="treeNodeResultMap"> |
||||
select id, parent_id, name as title, id as "value", id as "key" from blade_menu where is_deleted = 0 order by sort |
||||
</select> |
||||
|
||||
<select id="grantTreeByRole" resultMap="treeNodeResultMap"> |
||||
select id, parent_id, name as title, id as "value", id as "key" from blade_menu where is_deleted = 0 |
||||
and id in ( select menu_id from blade_role_menu where role_id in |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> ) |
||||
or id in ( |
||||
select parent_id from blade_menu where is_deleted = 0 |
||||
and id in ( select menu_id from blade_role_menu where role_id in |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> ) |
||||
) |
||||
order by sort |
||||
</select> |
||||
|
||||
<select id="grantTopTree" resultMap="treeNodeResultMap"> |
||||
select id, parent_id, name as title, id as "value", id as "key" from blade_menu where category = 1 and is_deleted = 0 order by sort |
||||
</select> |
||||
|
||||
<select id="grantTopTreeByRole" resultMap="treeNodeResultMap"> |
||||
select id, parent_id, name as title, id as "value", id as "key" from blade_menu where category = 1 and is_deleted = 0 |
||||
and id in ( select menu_id from blade_role_menu where role_id in |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> ) |
||||
or id in ( |
||||
select parent_id from blade_menu where is_deleted = 0 |
||||
and id in ( select menu_id from blade_role_menu where role_id in |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> ) |
||||
) |
||||
order by sort |
||||
</select> |
||||
|
||||
<select id="grantDataScopeTree" resultMap="treeNodeResultMap"> |
||||
SELECT |
||||
* |
||||
FROM |
||||
( |
||||
SELECT |
||||
id, |
||||
parent_id, |
||||
NAME AS title, |
||||
id AS "value", |
||||
id AS "key" |
||||
FROM |
||||
blade_menu |
||||
WHERE |
||||
category = 1 |
||||
AND is_deleted = 0 |
||||
AND id IN ( SELECT menu_id FROM blade_scope_data WHERE is_deleted = 0 AND menu_id IS NOT NULL ) |
||||
) menu |
||||
|
||||
UNION ALL |
||||
|
||||
SELECT |
||||
id, |
||||
menu_id AS parent_id, |
||||
scope_name AS title, |
||||
id AS "value", |
||||
id AS "key" |
||||
FROM |
||||
blade_scope_data |
||||
WHERE |
||||
is_deleted = 0 |
||||
AND menu_id IS NOT NULL |
||||
</select> |
||||
|
||||
<select id="grantApiScopeTree" resultMap="treeNodeResultMap"> |
||||
SELECT |
||||
* |
||||
FROM |
||||
( |
||||
SELECT |
||||
id, |
||||
parent_id, |
||||
NAME AS title, |
||||
id AS "value", |
||||
id AS "key" |
||||
FROM |
||||
blade_menu |
||||
WHERE |
||||
category = 1 |
||||
AND is_deleted = 0 |
||||
AND id IN ( SELECT menu_id FROM blade_scope_api WHERE is_deleted = 0 AND menu_id IS NOT NULL ) |
||||
) menu |
||||
|
||||
UNION ALL |
||||
|
||||
SELECT |
||||
id, |
||||
menu_id AS parent_id, |
||||
scope_name AS title, |
||||
id AS "value", |
||||
id AS "key" |
||||
FROM |
||||
blade_scope_api |
||||
WHERE |
||||
is_deleted = 0 |
||||
AND menu_id IS NOT NULL |
||||
</select> |
||||
|
||||
<select id="grantDataScopeTreeByRole" resultMap="treeNodeResultMap"> |
||||
SELECT |
||||
* |
||||
FROM |
||||
( |
||||
SELECT |
||||
id, |
||||
parent_id, |
||||
NAME AS title, |
||||
id AS "value", |
||||
id AS "key" |
||||
FROM |
||||
blade_menu |
||||
WHERE |
||||
category = 1 |
||||
AND is_deleted = 0 |
||||
AND id IN ( SELECT menu_id FROM blade_scope_data WHERE is_deleted = 0 AND menu_id IS NOT NULL ) |
||||
AND ( |
||||
id IN ( |
||||
select menu_id from blade_role_menu where role_id in |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> |
||||
) |
||||
OR id IN ( |
||||
select parent_id from blade_menu where is_deleted = 0 |
||||
and id in ( select menu_id from blade_role_menu where role_id in |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> ) |
||||
) |
||||
) |
||||
) menu |
||||
|
||||
UNION ALL |
||||
|
||||
SELECT |
||||
id, |
||||
menu_id AS parent_id, |
||||
scope_name AS title, |
||||
id AS "value", |
||||
id AS "key" |
||||
FROM |
||||
blade_scope_data |
||||
WHERE |
||||
is_deleted = 0 |
||||
AND ( |
||||
menu_id IN ( |
||||
select menu_id from blade_role_menu where role_id in |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> |
||||
) |
||||
OR menu_id IN ( |
||||
select parent_id from blade_menu where is_deleted = 0 |
||||
and id in ( select menu_id from blade_role_menu where role_id in |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> ) |
||||
) |
||||
) |
||||
AND menu_id IS NOT NULL |
||||
</select> |
||||
|
||||
<select id="grantApiScopeTreeByRole" resultMap="treeNodeResultMap"> |
||||
SELECT |
||||
* |
||||
FROM |
||||
( |
||||
SELECT |
||||
id, |
||||
parent_id, |
||||
NAME AS title, |
||||
id AS "value", |
||||
id AS "key" |
||||
FROM |
||||
blade_menu |
||||
WHERE |
||||
category = 1 |
||||
AND is_deleted = 0 |
||||
AND id IN ( SELECT menu_id FROM blade_scope_api WHERE is_deleted = 0 AND menu_id IS NOT NULL ) |
||||
AND ( |
||||
id IN ( |
||||
select menu_id from blade_role_menu where role_id in |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> |
||||
) |
||||
OR id IN ( |
||||
select parent_id from blade_menu where is_deleted = 0 |
||||
and id in ( |
||||
select menu_id from blade_role_menu where role_id in |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> ) |
||||
) |
||||
) |
||||
) menu |
||||
|
||||
UNION ALL |
||||
|
||||
SELECT |
||||
id, |
||||
menu_id AS parent_id, |
||||
scope_name AS title, |
||||
id AS "value", |
||||
id AS "key" |
||||
FROM |
||||
blade_scope_api |
||||
WHERE |
||||
is_deleted = 0 |
||||
AND |
||||
( |
||||
menu_id IN ( |
||||
select menu_id from blade_role_menu where role_id in |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> |
||||
) |
||||
OR menu_id IN ( |
||||
select parent_id from blade_menu where is_deleted = 0 |
||||
and id in ( select menu_id from blade_role_menu where role_id in |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> ) |
||||
) |
||||
) |
||||
AND menu_id IS NOT NULL |
||||
</select> |
||||
|
||||
<select id="authRoutes" resultType="org.springblade.system.pojo.dto.MenuDTO"> |
||||
SELECT |
||||
GROUP_CONCAT(r.role_alias) as alias, |
||||
m.path |
||||
FROM |
||||
blade_role_menu rm |
||||
LEFT JOIN blade_menu m ON rm.menu_id = m.id |
||||
LEFT JOIN blade_role r ON rm.role_id = r.id |
||||
WHERE |
||||
rm.role_id IN |
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> |
||||
AND m.path IS NOT NULL and m.is_deleted = 0 |
||||
GROUP BY m.path |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -1,20 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.ParamMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="paramResultMap" type="org.springblade.system.pojo.entity.Param"> |
||||
<result column="id" property="id"/> |
||||
<result column="create_user" property="createUser"/> |
||||
<result column="create_time" property="createTime"/> |
||||
<result column="update_user" property="updateUser"/> |
||||
<result column="update_time" property="updateTime"/> |
||||
<result column="status" property="status"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
<result column="param_name" property="paramName"/> |
||||
<result column="param_key" property="paramKey"/> |
||||
<result column="param_value" property="paramValue"/> |
||||
<result column="remark" property="remark"/> |
||||
</resultMap> |
||||
|
||||
</mapper> |
||||
@ -1,40 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.PostMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="postResultMap" type="org.springblade.system.pojo.entity.Post"> |
||||
<result column="id" property="id"/> |
||||
<result column="create_user" property="createUser"/> |
||||
<result column="create_dept" property="createDept"/> |
||||
<result column="create_time" property="createTime"/> |
||||
<result column="update_user" property="updateUser"/> |
||||
<result column="update_time" property="updateTime"/> |
||||
<result column="status" property="status"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
<result column="category" property="category"/> |
||||
<result column="post_code" property="postCode"/> |
||||
<result column="post_name" property="postName"/> |
||||
<result column="sort" property="sort"/> |
||||
<result column="remark" property="remark"/> |
||||
</resultMap> |
||||
|
||||
|
||||
<select id="selectPostPage" resultMap="postResultMap"> |
||||
select * from blade_post where is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="getPostNames" resultType="java.lang.String"> |
||||
SELECT |
||||
post_name |
||||
FROM |
||||
blade_post |
||||
WHERE |
||||
id IN |
||||
<foreach collection="array" item="ids" index="index" open="(" close=")" separator=","> |
||||
#{ids} |
||||
</foreach> |
||||
and is_deleted = 0 |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -1,26 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.RecordDataMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="recordDataResultMap" type="org.springblade.system.pojo.entity.RecordData"> |
||||
<result column="service_id" property="serviceId"/> |
||||
<result column="server_host" property="serverHost"/> |
||||
<result column="server_ip" property="serverIp"/> |
||||
<result column="env" property="env"/> |
||||
<result column="level" property="recordLevel"/> |
||||
<result column="method" property="method"/> |
||||
<result column="request_uri" property="requestUri"/> |
||||
<result column="user_agent" property="userAgent"/> |
||||
<result column="remote_ip" property="remoteIp"/> |
||||
<result column="operation" property="operation"/> |
||||
<result column="table_name" property="tableName"/> |
||||
<result column="old_data" property="oldData"/> |
||||
<result column="new_data" property="newData"/> |
||||
<result column="record_message" property="recordMessage"/> |
||||
<result column="record_result" property="recordResult"/> |
||||
<result column="record_cost" property="recordCost"/> |
||||
<result column="record_time" property="recordTime"/> |
||||
<result column="record_user" property="recordUser"/> |
||||
</resultMap> |
||||
</mapper> |
||||
@ -1,105 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.RegionMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="regionResultMap" type="org.springblade.system.pojo.entity.Region"> |
||||
<id column="code" property="code"/> |
||||
<result column="parent_code" property="parentCode"/> |
||||
<result column="ancestors" property="ancestors"/> |
||||
<result column="name" property="name"/> |
||||
<result column="province_code" property="provinceCode"/> |
||||
<result column="province_name" property="provinceName"/> |
||||
<result column="city_code" property="cityCode"/> |
||||
<result column="city_name" property="cityName"/> |
||||
<result column="district_code" property="districtCode"/> |
||||
<result column="district_name" property="districtName"/> |
||||
<result column="town_code" property="townCode"/> |
||||
<result column="town_name" property="townName"/> |
||||
<result column="village_code" property="villageCode"/> |
||||
<result column="village_name" property="villageName"/> |
||||
<result column="level" property="regionLevel"/> |
||||
<result column="sort" property="sort"/> |
||||
<result column="remark" property="remark"/> |
||||
</resultMap> |
||||
|
||||
<resultMap id="regionVOResultMap" type="org.springblade.system.pojo.vo.RegionVO"> |
||||
<id column="code" property="code"/> |
||||
<result column="parent_code" property="parentCode"/> |
||||
<result column="ancestors" property="ancestors"/> |
||||
<result column="name" property="name"/> |
||||
<result column="province_code" property="provinceCode"/> |
||||
<result column="province_name" property="provinceName"/> |
||||
<result column="city_code" property="cityCode"/> |
||||
<result column="city_name" property="cityName"/> |
||||
<result column="district_code" property="districtCode"/> |
||||
<result column="district_name" property="districtName"/> |
||||
<result column="town_code" property="townCode"/> |
||||
<result column="town_name" property="townName"/> |
||||
<result column="village_code" property="villageCode"/> |
||||
<result column="village_name" property="villageName"/> |
||||
<result column="level" property="regionLevel"/> |
||||
<result column="sort" property="sort"/> |
||||
<result column="remark" property="remark"/> |
||||
<result column="id" property="id"/> |
||||
<result column="parent_id" property="parentId"/> |
||||
<result column="has_children" property="hasChildren"/> |
||||
</resultMap> |
||||
|
||||
<resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode"> |
||||
<id column="id" property="id"/> |
||||
<result column="parent_id" property="parentId"/> |
||||
<result column="title" property="title"/> |
||||
<result column="value" property="value"/> |
||||
<result column="key" property="key"/> |
||||
<result column="has_children" property="hasChildren"/> |
||||
</resultMap> |
||||
|
||||
<select id="lazyList" resultMap="regionVOResultMap"> |
||||
SELECT |
||||
region.*, |
||||
( SELECT CASE WHEN count( 1 ) > 0 THEN 1 ELSE 0 END FROM blade_region WHERE parent_code = region.code ) AS "has_children" |
||||
FROM |
||||
blade_region region |
||||
<where> |
||||
<if test="param1!=null"> |
||||
and region.parent_code = #{param1} |
||||
</if> |
||||
<if test="param2.code!=null and param2.code!=''"> |
||||
and region.code like concat(concat('%', #{param2.code}),'%') |
||||
</if> |
||||
<if test="param2.name!=null and param2.name!=''"> |
||||
and region.name like concat(concat('%', #{param2.name}),'%') |
||||
</if> |
||||
</where> |
||||
</select> |
||||
|
||||
<select id="lazyTree" resultMap="treeNodeResultMap"> |
||||
SELECT |
||||
region.code AS "id", |
||||
region.parent_code AS "parent_id", |
||||
region.name AS "title", |
||||
region.code AS "value", |
||||
region.code AS "key", |
||||
( SELECT CASE WHEN count( 1 ) > 0 THEN 1 ELSE 0 END FROM blade_region WHERE parent_code = region.code ) AS "has_children" |
||||
FROM |
||||
blade_region region |
||||
<where> |
||||
<if test="param1!=null"> |
||||
and region.parent_code = #{param1} |
||||
</if> |
||||
<if test="param2.code!=null and param2.code!=''"> |
||||
and region.code like concat(concat('%', #{param2.code}),'%') |
||||
</if> |
||||
<if test="param2.name!=null and param2.name!=''"> |
||||
and region.name like concat(concat('%', #{param2.name}),'%') |
||||
</if> |
||||
</where> |
||||
ORDER BY region.code |
||||
</select> |
||||
|
||||
<select id="exportRegion" resultType="org.springblade.system.excel.RegionExcel"> |
||||
SELECT * FROM blade_region ${ew.customSqlSegment} |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -1,63 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.RoleMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="roleResultMap" type="org.springblade.system.pojo.entity.Role"> |
||||
<id column="id" property="id"/> |
||||
<result column="parent_id" property="parentId"/> |
||||
<result column="role_name" property="roleName"/> |
||||
<result column="sort" property="sort"/> |
||||
<result column="role_alias" property="roleAlias"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
</resultMap> |
||||
|
||||
<resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode"> |
||||
<id column="id" property="id"/> |
||||
<result column="parent_id" property="parentId"/> |
||||
<result column="title" property="title"/> |
||||
<result column="value" property="value"/> |
||||
<result column="key" property="key"/> |
||||
</resultMap> |
||||
|
||||
<select id="selectRolePage" resultMap="roleResultMap"> |
||||
select * from blade_role where is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="tree" resultMap="treeNodeResultMap"> |
||||
select id, parent_id, role_name as title, id as "value", id as "key" from blade_role where is_deleted = 0 |
||||
<if test="param1!=null"> |
||||
and tenant_id = #{param1} |
||||
</if> |
||||
<if test="param2!=null"> |
||||
and role_alias <> #{param2} |
||||
</if> |
||||
</select> |
||||
|
||||
<select id="getRoleNames" resultType="java.lang.String"> |
||||
SELECT |
||||
role_name |
||||
FROM |
||||
blade_role |
||||
WHERE |
||||
id IN |
||||
<foreach collection="array" item="ids" index="index" open="(" close=")" separator=","> |
||||
#{ids} |
||||
</foreach> |
||||
and is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="getRoleAliases" resultType="java.lang.String"> |
||||
SELECT |
||||
role_alias |
||||
FROM |
||||
blade_role |
||||
WHERE |
||||
id IN |
||||
<foreach collection="array" item="ids" index="index" open="(" close=")" separator=","> |
||||
#{ids} |
||||
</foreach> |
||||
and is_deleted = 0 |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -1,16 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.RoleMenuMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="roleMenuResultMap" type="org.springblade.system.pojo.entity.RoleMenu"> |
||||
<id column="id" property="id"/> |
||||
<result column="menu_id" property="menuId"/> |
||||
<result column="role_id" property="roleId"/> |
||||
</resultMap> |
||||
|
||||
<select id="selectRoleMenuPage" resultMap="roleMenuResultMap"> |
||||
select * from blade_role_menu where is_deleted = 0 |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -1,12 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.RoleScopeMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="roleMenuResultMap" type="org.springblade.system.pojo.entity.RoleScope"> |
||||
<id column="id" property="id"/> |
||||
<result column="scope_id" property="scopeId"/> |
||||
<result column="role_id" property="roleId"/> |
||||
</resultMap> |
||||
|
||||
</mapper> |
||||
@ -1,22 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.TenantDatasourceMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="datasourceResultMap" type="org.springblade.system.pojo.entity.TenantDatasource"> |
||||
<result column="id" property="id"/> |
||||
<result column="create_user" property="createUser"/> |
||||
<result column="create_dept" property="createDept"/> |
||||
<result column="create_time" property="createTime"/> |
||||
<result column="update_user" property="updateUser"/> |
||||
<result column="update_time" property="updateTime"/> |
||||
<result column="status" property="status"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
<result column="driver_class" property="driverClass"/> |
||||
<result column="url" property="url"/> |
||||
<result column="username" property="username"/> |
||||
<result column="password" property="password"/> |
||||
<result column="remark" property="remark"/> |
||||
</resultMap> |
||||
|
||||
</mapper> |
||||
@ -1,31 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.TenantMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="tenantResultMap" type="org.springblade.system.pojo.entity.Tenant"> |
||||
<result column="id" property="id"/> |
||||
<result column="create_user" property="createUser"/> |
||||
<result column="create_time" property="createTime"/> |
||||
<result column="update_user" property="updateUser"/> |
||||
<result column="update_time" property="updateTime"/> |
||||
<result column="status" property="status"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
<result column="tenant_id" property="tenantId"/> |
||||
<result column="tenant_name" property="tenantName"/> |
||||
<result column="domain_url" property="domainUrl"/> |
||||
<result column="background_url" property="backgroundUrl"/> |
||||
<result column="linkman" property="linkman"/> |
||||
<result column="contact_number" property="contactNumber"/> |
||||
<result column="address" property="address"/> |
||||
<result column="account_number" property="accountNumber"/> |
||||
<result column="expire_time" property="expireTime"/> |
||||
<result column="license_key" property="licenseKey"/> |
||||
</resultMap> |
||||
|
||||
|
||||
<select id="selectTenantPage" resultMap="tenantResultMap"> |
||||
select * from blade_tenant where is_deleted = 0 |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -1,20 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.TenantPackageMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="tenantPackageResultMap" type="org.springblade.system.pojo.entity.TenantPackage"> |
||||
<result column="id" property="id"/> |
||||
<result column="create_user" property="createUser"/> |
||||
<result column="create_dept" property="createDept"/> |
||||
<result column="create_time" property="createTime"/> |
||||
<result column="update_user" property="updateUser"/> |
||||
<result column="update_time" property="updateTime"/> |
||||
<result column="status" property="status"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
<result column="package_name" property="packageName"/> |
||||
<result column="menu_id" property="menuId"/> |
||||
<result column="remark" property="remark"/> |
||||
</resultMap> |
||||
|
||||
</mapper> |
||||
@ -1,21 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.TopMenuMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="topMenuResultMap" type="org.springblade.system.pojo.entity.TopMenu"> |
||||
<result column="id" property="id"/> |
||||
<result column="create_user" property="createUser"/> |
||||
<result column="create_dept" property="createDept"/> |
||||
<result column="create_time" property="createTime"/> |
||||
<result column="update_user" property="updateUser"/> |
||||
<result column="update_time" property="updateTime"/> |
||||
<result column="status" property="status"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
<result column="code" property="code"/> |
||||
<result column="name" property="name"/> |
||||
<result column="source" property="source"/> |
||||
<result column="sort" property="sort"/> |
||||
</resultMap> |
||||
|
||||
</mapper> |
||||
@ -1,5 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.TopMenuSettingMapper"> |
||||
|
||||
</mapper> |
||||
@ -1,5 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.UserAppMapper"> |
||||
|
||||
</mapper> |
||||
@ -1,5 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.UserDeptMapper"> |
||||
|
||||
</mapper> |
||||
@ -1,90 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.UserMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="userResultMap" type="org.springblade.system.pojo.entity.User"> |
||||
<result column="id" property="id"/> |
||||
<result column="tenant_id" property="tenantId"/> |
||||
<result column="create_user" property="createUser"/> |
||||
<result column="create_time" property="createTime"/> |
||||
<result column="update_user" property="updateUser"/> |
||||
<result column="update_time" property="updateTime"/> |
||||
<result column="status" property="status"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
<result column="code" property="code"/> |
||||
<result column="user_type" property="userType"/> |
||||
<result column="account" property="account"/> |
||||
<result column="password" property="password"/> |
||||
<result column="name" property="name"/> |
||||
<result column="real_name" property="realName"/> |
||||
<result column="email" property="email"/> |
||||
<result column="phone" property="phone"/> |
||||
<result column="birthday" property="birthday"/> |
||||
<result column="sex" property="sex"/> |
||||
<result column="role_id" property="roleId"/> |
||||
<result column="dept_id" property="deptId"/> |
||||
<result column="post_id" property="postId"/> |
||||
</resultMap> |
||||
|
||||
<select id="selectUserPage" resultMap="userResultMap"> |
||||
select * from blade_user where is_deleted = 0 |
||||
<if test="tenantId!=null and tenantId != ''"> |
||||
and tenant_id = #{tenantId} |
||||
</if> |
||||
<if test="user.tenantId!=null and user.tenantId != ''"> |
||||
and tenant_id = #{user.tenantId} |
||||
</if> |
||||
<if test="user.account!=null and user.account != ''"> |
||||
and account = #{user.account} |
||||
</if> |
||||
<if test="user.realName!=null and user.realName != ''"> |
||||
and real_name = #{user.realName} |
||||
</if> |
||||
<if test="user.userType!=null and user.userType != ''"> |
||||
and user_type = #{user.userType} |
||||
</if> |
||||
<if test="user.status!=null and user.status>=0"> |
||||
and status = #{user.status} |
||||
</if> |
||||
<if test="deptIdList!=null and deptIdList.size>0"> |
||||
and id in ( |
||||
SELECT |
||||
user_id |
||||
FROM |
||||
blade_user_dept |
||||
WHERE |
||||
dept_id IN |
||||
<foreach collection="deptIdList" index="index" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> |
||||
) |
||||
</if> |
||||
ORDER BY id |
||||
</select> |
||||
|
||||
<select id="getUser" resultMap="userResultMap"> |
||||
SELECT |
||||
* |
||||
FROM |
||||
blade_user |
||||
WHERE |
||||
tenant_id = #{param1} and account = #{param2} and status = 1 and is_deleted = 0 |
||||
</select> |
||||
|
||||
|
||||
|
||||
<select id="getUserByPhone" resultMap="userResultMap"> |
||||
SELECT |
||||
* |
||||
FROM |
||||
blade_user |
||||
WHERE |
||||
tenant_id = #{param1} and phone = #{param2} and status = 1 and is_deleted = 0 |
||||
</select> |
||||
|
||||
<select id="exportUser" resultType="org.springblade.system.excel.UserExcel"> |
||||
SELECT id, tenant_id, user_type, account, name, real_name, email, phone, birthday, role_id, dept_id, post_id FROM blade_user ${ew.customSqlSegment} |
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -1,22 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.UserOauthMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="userResultMap" type="org.springblade.system.pojo.entity.UserOauth"> |
||||
<result column="id" property="id"/> |
||||
<result column="tenant_id" property="tenantId"/> |
||||
<result column="user_id" property="userId"/> |
||||
<result column="username" property="username"/> |
||||
<result column="nickname" property="nickname"/> |
||||
<result column="avatar" property="avatar"/> |
||||
<result column="blog" property="blog"/> |
||||
<result column="company" property="company"/> |
||||
<result column="location" property="location"/> |
||||
<result column="email" property="email"/> |
||||
<result column="remark" property="remark"/> |
||||
<result column="gender" property="gender"/> |
||||
<result column="source" property="source"/> |
||||
</resultMap> |
||||
|
||||
</mapper> |
||||
@ -1,5 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.UserOtherMapper"> |
||||
|
||||
</mapper> |
||||
@ -1,5 +0,0 @@ |
||||
<?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="org.springblade.system.mapper.UserWebMapper"> |
||||
|
||||
</mapper> |
||||
Loading…
Reference in new issue