兼容性调整
This commit is contained in:
parent
679a191606
commit
3252498510
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@ -31,7 +31,7 @@
|
||||
"server": "localhost",
|
||||
"port": 3306,
|
||||
"driver": "MySQL",
|
||||
"name": "localhost",
|
||||
"name": "localhost-mysql",
|
||||
"database": "ry",
|
||||
"username": "root",
|
||||
"password": "123456"
|
||||
@ -41,7 +41,7 @@
|
||||
"server": "localhost",
|
||||
"port": 5432,
|
||||
"driver": "PostgreSQL",
|
||||
"name": "postgres",
|
||||
"name": "localhost-postgres",
|
||||
"database": "ry",
|
||||
"username": "postgres",
|
||||
"password": "123456"
|
||||
|
@ -7,14 +7,14 @@ spring:
|
||||
primary: MASTER
|
||||
datasource:
|
||||
# 主库数据源
|
||||
# MASTER:
|
||||
# url: jdbc:mysql://127.0.0.1/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
# password: 123456
|
||||
MASTER:
|
||||
url: jdbc:postgresql://127.0.0.1/ry
|
||||
username: postgres
|
||||
url: jdbc:mysql://127.0.0.1/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: 123456
|
||||
# MASTER:
|
||||
# url: jdbc:postgresql://127.0.0.1/ry
|
||||
# username: postgres
|
||||
# password: 123456
|
||||
# 从库数据源
|
||||
# SLAVE:
|
||||
# url: jdbc:mysql://127.0.0.1/ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
|
@ -29,7 +29,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMenuVo">
|
||||
select menu_id, menu_name, parent_id, order_num, path, component, `query`, route_name, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time
|
||||
select menu_id, menu_name, parent_id, order_num, path, component, sys_menu.query, route_name, is_frame, is_cache, menu_type, visible, status, COALESCE(perms,'') as perms, icon, create_time
|
||||
from sys_menu
|
||||
</sql>
|
||||
|
||||
@ -50,13 +50,13 @@
|
||||
</select>
|
||||
|
||||
<select id="selectMenuTreeAll" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.route_name, m.visible, m.status, COALESCE(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
from sys_menu m where m.menu_type in ('M', 'C') and m.status = '0'
|
||||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
|
||||
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.route_name, m.visible, m.status, COALESCE(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||
@ -75,13 +75,13 @@
|
||||
</select>
|
||||
|
||||
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.route_name, m.visible, m.status, COALESCE(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||
left join sys_role ro on ur.role_id = ro.role_id
|
||||
left join sys_user u on ur.user_id = u.user_id
|
||||
where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0 AND ro.status = 0
|
||||
where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = '0' AND ro.status = 0
|
||||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
|
||||
@ -141,7 +141,7 @@
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
<if test="path != null and path != ''">path = #{path},</if>
|
||||
<if test="component != null">component = #{component},</if>
|
||||
<if test="query != null">`query` = #{query},</if>
|
||||
<if test="query != null">sys_menu.query = #{query},</if>
|
||||
<if test="routeName != null">route_name = #{routeName},</if>
|
||||
<if test="isFrame != null and isFrame != ''">is_frame = #{isFrame},</if>
|
||||
<if test="isCache != null and isCache != ''">is_cache = #{isCache},</if>
|
||||
@ -165,7 +165,7 @@
|
||||
<if test="orderNum != null">order_num,</if>
|
||||
<if test="path != null and path != ''">path,</if>
|
||||
<if test="component != null and component != ''">component,</if>
|
||||
<if test="query != null and query != ''">`query`,</if>
|
||||
<if test="query != null and query != ''">sys_menu.query,</if>
|
||||
<if test="routeName != null">route_name,</if>
|
||||
<if test="isFrame != null and isFrame != ''">is_frame,</if>
|
||||
<if test="isCache != null and isCache != ''">is_cache,</if>
|
||||
|
7
sql/postgresql/注意.md
Normal file
7
sql/postgresql/注意.md
Normal file
@ -0,0 +1,7 @@
|
||||
find_in_set\(([^,]+),\s*([^)]+)\)
|
||||
|
||||
array_position(string_to_array($2, ','), $1)
|
||||
|
||||
sysdate()
|
||||
|
||||
CURRENT_TIMESTAMP
|
Loading…
Reference in New Issue
Block a user