diff --git a/.vscode/settings.json b/.vscode/settings.json index 072ca11..42f2e7d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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" diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 70d46ca..8657312 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -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 diff --git a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml index 84e87c9..dee8dc4 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml @@ -29,7 +29,7 @@ - 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 @@ -50,13 +50,13 @@ @@ -141,7 +141,7 @@ order_num = #{orderNum}, path = #{path}, component = #{component}, - `query` = #{query}, + sys_menu.query = #{query}, route_name = #{routeName}, is_frame = #{isFrame}, is_cache = #{isCache}, @@ -165,7 +165,7 @@ order_num, path, component, - `query`, + sys_menu.query, route_name, is_frame, is_cache, diff --git a/sql/postgresql/注意.md b/sql/postgresql/注意.md new file mode 100644 index 0000000..e3f7025 --- /dev/null +++ b/sql/postgresql/注意.md @@ -0,0 +1,7 @@ +find_in_set\(([^,]+),\s*([^)]+)\) + +array_position(string_to_array($2, ','), $1) + +sysdate() + +CURRENT_TIMESTAMP